<?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: Searching a SAS dataset while reading in a Flatefile in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68433#M14848</link>
    <description>Thanks for the assistance "sbb". You suggestion worked perfectly. Great SAS technique!</description>
    <pubDate>Wed, 21 Jan 2009 01:31:13 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-01-21T01:31:13Z</dc:date>
    <item>
      <title>Searching a SAS dataset while reading in a Flatefile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68430#M14845</link>
      <description>I have a situation in which I need to read in an extremely large flatfile (on multiple tapes) into my SAS program. I need to compare the zipcodes in this flatfile with a list of zipcodes I have in a SAS file. If the zipcode in the input file appears on the SAS zipcode file, I want to keep that record for additional processing.&lt;BR /&gt;
&lt;BR /&gt;
I was hoping to be able filter out the records I do not what while I am reading them and not read in the entire file into a SAS dataset to then determine which records a what to keep. Something like:&lt;BR /&gt;
&lt;BR /&gt;
data In_File; &lt;BR /&gt;
infile MASTER  Length=Recl TRUNCOVER; &lt;BR /&gt;
   input @001   zip $ 5.  @;&lt;BR /&gt;
          If zip is in ZIPCODE file, then keep record;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Any thoughts on how to do this in the Data Step that reads in the large file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 09 Jan 2009 23:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68430#M14845</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-09T23:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a SAS dataset while reading in a Flatefile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68431#M14846</link>
      <description>Consider using SAS PROC FORMAT to build a look-up data table, and you would use the SAS PUT function in your DATA step to determine if the input-file data contents is contained in your selection criteria (from your SAS file, after it has been converted to the SAS format).  A SAS file can be used as input to the PROC FORMAT procedure, using the CNTLIN= keyword, when the SAS file is populated with specific-named SAS variables (FMTNAME, HLO, START, LABEL, at a minimum).&lt;BR /&gt;
&lt;BR /&gt;
You can use the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  to find SAS-hosted product documentation and also SAS user community technical papers on this topic.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Creating a Format from Raw Data or a SAS® Dataset&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/068-2007.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
SAS FORMAT PROCEDURE&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a000063536.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a000063536.htm&lt;/A&gt;</description>
      <pubDate>Fri, 09 Jan 2009 23:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68431#M14846</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-01-09T23:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a SAS dataset while reading in a Flatefile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68432#M14847</link>
      <description>You could also consider to use SET with the KEY option, if you are having your zipcode table indexed. Another approach could to read the file with a data step view, then do an inner join to the zipcode table.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Mon, 12 Jan 2009 07:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68432#M14847</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-01-12T07:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a SAS dataset while reading in a Flatefile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68433#M14848</link>
      <description>Thanks for the assistance "sbb". You suggestion worked perfectly. Great SAS technique!</description>
      <pubDate>Wed, 21 Jan 2009 01:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68433#M14848</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-21T01:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a SAS dataset while reading in a Flatefile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68434#M14849</link>
      <description>You may want to create a format from your small SAS file.  Your label can consist of 'matchyes' or 'matchno'.  'matchno' would have a value of 'other'.  Then add a where statement when running against the large file, "where zipcode = 'matchyes'".</description>
      <pubDate>Wed, 21 Jan 2009 02:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Searching-a-SAS-dataset-while-reading-in-a-Flatefile/m-p/68434#M14849</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-21T02:11:22Z</dc:date>
    </item>
  </channel>
</rss>

