<?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: Reading part of a (varying) filename into SAS dataset field, seperated by &amp;quot;_&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131619#M260662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Richard, this works perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2012 15:02:29 GMT</pubDate>
    <dc:creator>Lakes74</dc:creator>
    <dc:date>2012-11-21T15:02:29Z</dc:date>
    <item>
      <title>Reading part of a (varying) filename into SAS dataset field, seperated by "_"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131615#M260658</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 a large number of files where part of the information i require is held within the filename rather than contents of that file.&lt;/P&gt;&lt;P&gt;Eg: X1234567_AAA1_21112012.txt. I require the part at the first part (X1234567) ending before the underscore, which is straight forward to obtain.&lt;/P&gt;&lt;P&gt;The problem lies in the varying length of info, some are 8 cahrs long, others are 10 chars and longer.&lt;/P&gt;&lt;P&gt;I need to extract this information up to the point of the first underscore is displayed. This applies to all of the files.&lt;/P&gt;&lt;P&gt;Was thinking of using the Scan option but can't work out how to incorporate ine info before the underscore.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 13:39:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131615#M260658</guid>
      <dc:creator>Lakes74</dc:creator>
      <dc:date>2012-11-21T13:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading part of a (varying) filename into SAS dataset field, seperated by "_"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131616#M260659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scan () is the function to use.&amp;nbsp; Scan(name, 1, '_') ; shou dgive the required info.&amp;nbsp; Third parameter specifies the delimiter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 13:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131616#M260659</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2012-11-21T13:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reading part of a (varying) filename into SAS dataset field, seperated by "_"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131617#M260660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did Richard's response provide the answer you needed?&amp;nbsp; If not, post your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 14:58:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131617#M260660</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-21T14:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading part of a (varying) filename into SAS dataset field, seperated by "_"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131618#M260661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it did Arthur. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:01:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131618#M260661</guid>
      <dc:creator>Lakes74</dc:creator>
      <dc:date>2012-11-21T15:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reading part of a (varying) filename into SAS dataset field, seperated by "_"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131619#M260662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Richard, this works perfectly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-part-of-a-varying-filename-into-SAS-dataset-field/m-p/131619#M260662</guid>
      <dc:creator>Lakes74</dc:creator>
      <dc:date>2012-11-21T15:02:29Z</dc:date>
    </item>
  </channel>
</rss>

