<?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: why cards stop reading values at some length in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88215#M25163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. Really appreciate you spending time helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one more question: if I include that long list directly in the Cards, it works; i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;infile cards delimiter="=," ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length var $ 30;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;0=Emergency Services, 1=Tele Call, 2=Cusstomet Answer, 3=TAB, 4=Ptt Mute Voice, 5=Com User Voice Control, 6=Com System User Call, 7=ABC, 8=Disc, 9=XYZ, 10=Exe News, 11=ABC Ext Source, 12=MNGFR Com and BFC MUYH, 13=Not Req&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So I guess the "lrecl of the input stream that SAS is using" means something SAS use internally?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jul 2013 16:44:48 GMT</pubDate>
    <dc:creator>abcd123</dc:creator>
    <dc:date>2013-07-24T16:44:48Z</dc:date>
    <item>
      <title>why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88211#M25159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have following code (which is very similar to my real work):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;%let string=0=Emergency Services, 1=Tele Call, 2=Cusstomet Answer, 3=TAB, 4=&lt;SPAN style="color: #ff0000;"&gt;Ptt Mute Voice&lt;/SPAN&gt;, 5=Com User Voice Control, 6=Com System User Call, 7=ABC, 8=Disc, 9=XYZ, 10=Exe News, 11=ABC Ext Source, 12=MNGFR Com and BFC MUYH, 13=Not Req;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;infile cards delimiter="=," ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length var $ 30;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _infile_ = resolve(_infile_);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;amp;string&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;proc print data=test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code runs ok; however the result is kind of strange; there is only 10 rows in the result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Obs&lt;/TD&gt;&lt;TD&gt;var&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 2&lt;/TD&gt;&lt;TD&gt;Emergency Services&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 4&lt;/TD&gt;&lt;TD&gt;Tele Call&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 5&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 6&lt;/TD&gt;&lt;TD&gt;Cusstomet Answer&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 7&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 8&lt;/TD&gt;&lt;TD&gt;TAB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; 9&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; 10&lt;/TD&gt;&lt;TD&gt;Ptt Mute Voice&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does the code stop reading at &lt;SPAN style="color: #ff0000;"&gt;Ptt Mute Voice&lt;SPAN style="color: #000000;"&gt; ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 15:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88211#M25159</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2013-07-24T15:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88212#M25160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;perhaps you need to specify a different lrecl...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;infile cards delimiter="-," lrecl=1000 recfm=v;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 16:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88212#M25160</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-07-24T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88213#M25161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you cannot modify the lrecl of the input stream that SAS is using to read the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 16:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88213#M25161</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-24T16:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88214#M25162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;%let string=0=Emergency Services, 1=Tele Call, 2=Cusstomet Answer, 3=TAB, 4=Ptt Mute Voice, 5=Com User Voice Control, 6=Com System User Call, 7=ABC, 8=Disc, 9=XYZ, 10=Exe News, 11=ABC Ext Source, 12=MNGFR Com and BFC MUYH, 13=Not Req;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename junk temp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file junk lrecl=40000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put "&amp;amp;string";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile junk delimiter="=," lrecl=40000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length var $100 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input var @@;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put var;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 16:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88214#M25162</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-24T16:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88215#M25163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. Really appreciate you spending time helping me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one more question: if I include that long list directly in the Cards, it works; i.e.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;infile cards delimiter="=," ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; length var $ 30;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input var @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;0=Emergency Services, 1=Tele Call, 2=Cusstomet Answer, 3=TAB, 4=Ptt Mute Voice, 5=Com User Voice Control, 6=Com System User Call, 7=ABC, 8=Disc, 9=XYZ, 10=Exe News, 11=ABC Ext Source, 12=MNGFR Com and BFC MUYH, 13=Not Req&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So I guess the "lrecl of the input stream that SAS is using" means something SAS use internally?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #003366;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 16:44:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88215#M25163</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2013-07-24T16:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88216#M25164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Methinks you have discovered some artifacts left over from the ancient days when cards statement really meant physical cards with an lrecl of 80.&amp;nbsp; Looks to me like the assignment of a value to _infile_ is limited to 80 character, but when done by reading input buffer, the limit is not applied. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would consider scanning a character variable with the string value in it, rather than trying to get the cards statement to work.&amp;nbsp; Something like this would work and perhaps be a little more transparent to a maintenance program later on:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let string=0=Emergency Services, 1=Tele Call, 2=Cusstomet Answer, 3=TAB, 4=Ptt Mute Voice, 5=Com User Voice Control, 6=Com System User Call, 7=ABC, 8=Disc, 9=XYZ, 10=Exe News, 11=ABC Ext Source, 12=MNGFR Com and BFC MUYH, 13=Not Req;&lt;BR /&gt; &lt;BR /&gt;data test;&lt;/P&gt;&lt;P&gt; string = "&amp;amp;string";&lt;BR /&gt; i_scan = 1 ;&lt;BR /&gt; do until (scan(string,i_scan,",=") = '') ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var = scan(string,i_scan,",=") ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put _n_= var= ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_scan + 1 ;&lt;BR /&gt;&amp;nbsp; end ;&lt;BR /&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88216#M25164</guid>
      <dc:creator>LarryWorley</dc:creator>
      <dc:date>2013-07-24T17:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: why cards stop reading values at some length</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88217#M25165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 20:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/why-cards-stop-reading-values-at-some-length/m-p/88217#M25165</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2013-07-24T20:22:06Z</dc:date>
    </item>
  </channel>
</rss>

