<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24966#M4276</link>
    <description>There is an item in the latest SASware Ballot in the Language category on this issue:&lt;BR /&gt;
&lt;BR /&gt;
"add an option on the INFILE statement that enables you to perform case-insensitve comparisons by including @'string' on the INPUT statement"&lt;BR /&gt;
&lt;BR /&gt;
If you are keen you should vote for it!</description>
    <pubDate>Tue, 25 May 2010 01:48:28 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2010-05-25T01:48:28Z</dc:date>
    <item>
      <title>Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24955#M4265</link>
      <description>I want to read a file and ignore case.  I want all alpha characters converted to UPPERCASE or lowercase when SAS puts the record in the input buffer so I don't have to do it using something like&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
   INPUT @;&lt;BR /&gt;
   _infile_ = lowcase(_infile_);&lt;BR /&gt;
   input .........&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Is this possible?

Message was edited by: data _null_;</description>
      <pubDate>Wed, 19 May 2010 19:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24955#M4265</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-05-19T19:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24956#M4266</link>
      <description>Hi, data _null_;&lt;BR /&gt;
you try this.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data temp;&lt;BR /&gt;
  input sex $upcase1.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
F&lt;BR /&gt;
m&lt;BR /&gt;
m&lt;BR /&gt;
M&lt;BR /&gt;
f&lt;BR /&gt;
f&lt;BR /&gt;
F&lt;BR /&gt;
;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 20 May 2010 02:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24956#M4266</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-20T02:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24957#M4267</link>
      <description>I see I wasn't clear.  I want to use @'string' in an INPUT statement and ignore case.</description>
      <pubDate>Thu, 20 May 2010 10:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24957#M4267</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-05-20T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24958#M4268</link>
      <description>Sorry. not understand your mean.</description>
      <pubDate>Sat, 22 May 2010 05:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24958#M4268</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-22T05:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24959#M4269</link>
      <description>Hi data _null_&lt;BR /&gt;
&lt;BR /&gt;
I would say it's not possible because:&lt;BR /&gt;
- The INFILE statement only defines where and how a record should be read into the input buffer.&lt;BR /&gt;
- The null INPUT statement then causes SAS to read the record based on the definitions given by the infile statement. It's only reading - nothing gets altered. Only during the variable mapping against the input buffer data gets altered based on the informats.&lt;BR /&gt;
&lt;BR /&gt;
And that's why I think the code you've given is the most efficient way possible to achieve what you want.&lt;BR /&gt;
&lt;BR /&gt;
Well: Unless there is some undocumented system options or option for the INFILE statement I don't know of.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick

Message was edited by: Patrick</description>
      <pubDate>Sat, 22 May 2010 08:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24959#M4269</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-05-22T08:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24960#M4270</link>
      <description>Hi Patrick,&lt;BR /&gt;
&lt;BR /&gt;
Thanks,  using lowcase/upcase on _INFILE_ works well enough, but I really wanted to use SCANOVER with an input statement that scans records looking for text but igonring case.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
   input @'scan for string1' val1 @'scan for string2' val2 ...;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
I have been experimenting with @(prxmatch('/target/i')) but this positions the input pointer at the start of the found string so I need to +(length(target)).</description>
      <pubDate>Sat, 22 May 2010 18:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24960#M4270</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-05-22T18:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24961#M4271</link>
      <description>I hope this is not a step backwards, but you mention the CAPS option.  Does this not do what you want?&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
options caps;&lt;BR /&gt;
data a;&lt;BR /&gt;
input @'A' aftera $;&lt;BR /&gt;
datalines;&lt;BR /&gt;
d s e r a qwert qawetrqq A222qwerrt&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=a;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Sat, 22 May 2010 21:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24961#M4271</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-05-22T21:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24962#M4272</link>
      <description>Yes but that only works for CARDS and PARMCARDS.  I am reading PROC PRINTTO output.  There is a z/OS option CAPSOUT that would produce the desired result but I'm using winders.</description>
      <pubDate>Sat, 22 May 2010 21:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24962#M4272</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-05-22T21:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24963#M4273</link>
      <description>A Google advanced search using the argument "input informat uppercase site:sas.com" revealed this gem in the SAS 9.2 DOC, discussing the CAPS system option and also the $UPCASE INFORMAT.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.2 Language Reference: Concepts, Reading Raw Data: Types of Data&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/a003209899.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/a003209899.htm&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 23 May 2010 15:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24963#M4273</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-23T15:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24964#M4274</link>
      <description>Since you cannot use DATALINES, you could still process against _INFILE_ after it has been brought into the PDV.  The nested functions become a bit awkward but should not be too bad.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
* TRYCAP.TXT contains the data line from above.;&lt;BR /&gt;
filename txtline "c:\temp\trycap.txt";&lt;BR /&gt;
data a;&lt;BR /&gt;
infile txtline ;&lt;BR /&gt;
input ;&lt;BR /&gt;
aftera = scan(substr(_infile_,index(upcase(_infile_),'A')+1),1);&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
put aftera =;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print data=a;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This has the advantage of a case insensitive search, but the original case is preserved in the final data set.</description>
      <pubDate>Sun, 23 May 2010 19:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24964#M4274</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-05-23T19:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24965#M4275</link>
      <description>data _null_; seeks a linguistic search with input @'string'&lt;BR /&gt;
A really nice idea, but not yet supported. (I say YET because introduced in SAS92 are "linguistic" extensions to proc sort and others.&lt;BR /&gt;
Back in time SAS infile options included scope to define a user module (iirc it was a feature on the mvs platform - like everything once was mvs platform;-)&lt;BR /&gt;
A link to a sample program from (using the infile/file user exit facility) &lt;A href="http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#/documentation/cdl/en/hosto390/61886/HTML/default/mvs-ifue-sample.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/viewer.htm#/documentation/cdl/en/hosto390/61886/HTML/default/mvs-ifue-sample.htm&lt;/A&gt; &lt;BR /&gt;
May provide a direction to support entirely uppercasing the infile buffer, while sharing the external file reference with an infile which does not uppercase everything.&lt;BR /&gt;
 &lt;BR /&gt;
Unfortunately, I see no documentation suggesting "INFILE/FILE User Exit Facility" is available on other platforms.&lt;BR /&gt;
 &lt;BR /&gt;
just a thought&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Mon, 24 May 2010 11:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24965#M4275</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-05-24T11:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Option to read INFILE similar to CAPS option for CARDS or PARMCARDS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24966#M4276</link>
      <description>There is an item in the latest SASware Ballot in the Language category on this issue:&lt;BR /&gt;
&lt;BR /&gt;
"add an option on the INFILE statement that enables you to perform case-insensitve comparisons by including @'string' on the INPUT statement"&lt;BR /&gt;
&lt;BR /&gt;
If you are keen you should vote for it!</description>
      <pubDate>Tue, 25 May 2010 01:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Option-to-read-INFILE-similar-to-CAPS-option-for-CARDS-or/m-p/24966#M4276</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2010-05-25T01:48:28Z</dc:date>
    </item>
  </channel>
</rss>

