<?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: Need help in a filename statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88990#M257196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Personally I prefer to using 'pipe' plus 'filevar=' to tackle the problems like this. For infile statement and wildcard, please refer to this papter:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/166-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/166-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and go to the section: &lt;STRONG&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"ACCESSING FILE NAMES WITH ‘WILD CARDS’&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2012 13:54:26 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2012-10-09T13:54:26Z</dc:date>
    <item>
      <title>Need help in a filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88987#M257193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need helpnin a filename statement in sas.. I am using filename statement to read a file using filename statement with wildcards. Code... Filename `/dso/dsocln/hhhw/pers*.dat; However it can b poasible tht many file with same name so we want to.output the file name in sas output file. How to do.tbis? @ Alsi can we check d existence of the file matching the above naming pattern? need urgent help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 16:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88987#M257193</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2012-10-08T16:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in a filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88988#M257194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C FILENAME=myFile optn in INFILE stmt. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 17:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88988#M257194</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-10-08T17:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in a filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88989#M257195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am using filename statement to read a file using filename statement with wildcards. However it can be possible tht many file with same name so we want to.output the file name in sas output/list file. How to do this? Also can we check d existence of a file matching the naming pattern?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Filename=variable doesn't provide any option to print the input file name in sas output/list file.&lt;/P&gt;&lt;P&gt;Can you please elaborate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILENAME PUA&amp;nbsp; "/dso/dsocln/&amp;amp;srce./el/out/p_pers_uug*_F201201_*.txt" ;&lt;/P&gt;&lt;P&gt;data PERS ;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; retain&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PSTYRMO&amp;nbsp;&amp;nbsp; "201201";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile PUA&amp;nbsp; recfm=v&amp;nbsp; lrecl=413&amp;nbsp;&amp;nbsp; truncover ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @1&amp;nbsp; BLOCK&amp;nbsp;&amp;nbsp;&amp;nbsp; $char387.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 13:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88989#M257195</guid>
      <dc:creator>mnjtrana</dc:creator>
      <dc:date>2012-10-09T13:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in a filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88990#M257196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Personally I prefer to using 'pipe' plus 'filevar=' to tackle the problems like this. For infile statement and wildcard, please refer to this papter:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/166-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/166-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and go to the section: &lt;STRONG&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"ACCESSING FILE NAMES WITH ‘WILD CARDS’&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 13:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-in-a-filename-statement/m-p/88990#M257196</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-10-09T13:54:26Z</dc:date>
    </item>
  </channel>
</rss>

