<?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: Max length problem invoked by filevar and fileref in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405345#M98600</link>
    <description>&lt;P&gt;But there is a maxim record length so I cannot have the same output as the first one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And can I use any placeholder? I replaced it by something casually but I still have the length limit&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2017 20:41:35 GMT</pubDate>
    <dc:creator>xiaoys0725</dc:creator>
    <dc:date>2017-10-18T20:41:35Z</dc:date>
    <item>
      <title>Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405338#M98595</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am practicing filevar= option. I tried to mock the code in the advanced certification preparation book and the code is as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.sample;&lt;BR /&gt;do number=0,1,2;&lt;BR /&gt;nextfile="C:/CT/try/data/sample"!!compress(put(number,2.)!!".txt",'');&lt;BR /&gt;infile temp filevar=nextfile end=lastobs;&lt;BR /&gt;input ID one $ two $ three $;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I am thinking about what will happen if I replace the temp by a fileref, so the code becomes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename xyz 'C:/CT/try/data/sample0.txt';&lt;BR /&gt;data work.sample3;&lt;BR /&gt;do number=1,2;&lt;BR /&gt;nextfile="C:/CT/try/data/sample"!!compress(put(number,2.)!!".txt",'');&lt;BR /&gt;infile xyz filevar=nextfile end=lastobs;&lt;BR /&gt;input ID one $ two $ three $;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then I got the following log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The infile XYZ is:&lt;BR /&gt;Filename=C:\CT\try\data\sample1.txt,&lt;BR /&gt;RECFM=V,LRECL=32767,File Size (bytes)=706,&lt;BR /&gt;Last Modified=15Sep2017:15:13:54,&lt;BR /&gt;Create Time=15Sep2017:15:13:54&lt;/P&gt;&lt;P&gt;NOTE: The infile XYZ is:&lt;BR /&gt;Filename=C:\CT\try\data\sample2.txt,&lt;BR /&gt;RECFM=V,LRECL=32767,File Size (bytes)=220,&lt;BR /&gt;Last Modified=15Sep2017:15:14:20,&lt;BR /&gt;Create Time=15Sep2017:15:14:20&lt;/P&gt;&lt;P&gt;NOTE: 1 record was read from the infile XYZ.&lt;BR /&gt;The minimum record length was 30.&lt;BR /&gt;The maximum record length was 30.&lt;BR /&gt;NOTE: 1 record was read from the infile XYZ.&lt;BR /&gt;The minimum record length was 30.&lt;BR /&gt;The maximum record length was 30.&lt;BR /&gt;NOTE: The data set WORK.SAMPLE3 has 2 observations and 5 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.07 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why does this happen? Is it OK to use a fileref to replace the temp usually?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405338#M98595</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-10-18T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405340#M98596</link>
      <description>&lt;P&gt;The file reference in an infile statement with filevar= is just a placeholder.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405340#M98596</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-18T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405342#M98597</link>
      <description>&lt;P&gt;When used with filevar, the fileref is just a placeholder, It is ignored.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405342#M98597</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-18T20:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405343#M98598</link>
      <description>&lt;P&gt;PS I see no problem in your log.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405343#M98598</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-18T20:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405344#M98599</link>
      <description>&lt;P&gt;Thank you! Can I use any placeholder though? I replaced by something casually but I still have the length limit&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405344#M98599</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-10-18T20:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405345#M98600</link>
      <description>&lt;P&gt;But there is a maxim record length so I cannot have the same output as the first one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And can I use any placeholder? I replaced it by something casually but I still have the length limit&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405345#M98600</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-10-18T20:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405350#M98601</link>
      <description>&lt;P&gt;Log lines like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: 1 record was read from the infile XYZ.&lt;BR /&gt;The minimum record length was 30.&lt;BR /&gt;The maximum record length was 30.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is just information about your file. It doesn't signal any problem. Unless, of course, your file has records that aren't 30 characters long.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405350#M98601</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-18T20:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Max length problem invoked by filevar and fileref</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405351#M98602</link>
      <description>&lt;P&gt;Ohhhh Ok, thank you!!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 20:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Max-length-problem-invoked-by-filevar-and-fileref/m-p/405351#M98602</guid>
      <dc:creator>xiaoys0725</dc:creator>
      <dc:date>2017-10-18T20:46:07Z</dc:date>
    </item>
  </channel>
</rss>

