<?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: SAS to delete header and trailer in a file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-to-delete-header-and-trailer-in-a-file/m-p/56795#M15896</link>
    <description>Within the DATA step execution process, you can use the INFILE parameter END=&lt;YOUR_VARIABLE&gt;  keyword to detect end-of-file (last record encountered).  As well, for the initial pass of a DATA step execution, one technique is to use a RETAIN statement to set your own variable with a default value of 1 and then reset it to a zero.  So, for each of these conditions, you would use a RETURN, DELETE or do not issue an OUTPUT or PUT _INFILE_, depending on your particular SAS program execution requirements.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;   website has SAS-host documentation and also supplemental technical / conference topic papers -- you can either use the website SEARCH facility or here is a Google advanced search argument to locate some pertinent reference material on this topic:&lt;BR /&gt;
&lt;BR /&gt;
sas data step programming site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/YOUR_VARIABLE&gt;</description>
    <pubDate>Tue, 21 Jul 2009 14:10:43 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-07-21T14:10:43Z</dc:date>
    <item>
      <title>SAS to delete header and trailer in a file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-to-delete-header-and-trailer-in-a-file/m-p/56794#M15895</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;
   I am new to SAS and have a question for all the SAS guru's out there. I am trying to delete the header and trailer record &lt;BR /&gt; of a data file in sas and then continue with some other audits on that file. The header, the first record of the file is listed as Header90900.. and the trailer, the last record is listed as Trailer9900. &lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Can you please suggest the different ways how I could delete these in SAS ? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Example of file: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Header90900 &lt;BR /&gt;&lt;BR /&gt;
565 ff dfdd dfdd 878 &lt;BR /&gt;&lt;BR /&gt;
898 rtr sds  sss 0909 &lt;BR /&gt;&lt;BR /&gt;
....&lt;BR /&gt;
&lt;BR /&gt; ...&lt;BR /&gt;&lt;BR /&gt;
Trailer9900&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Note: The header and trailer have random numbers after them but they begin with the key words Header and Trailer.</description>
      <pubDate>Tue, 21 Jul 2009 14:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-to-delete-header-and-trailer-in-a-file/m-p/56794#M15895</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-07-21T14:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to delete header and trailer in a file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-to-delete-header-and-trailer-in-a-file/m-p/56795#M15896</link>
      <description>Within the DATA step execution process, you can use the INFILE parameter END=&lt;YOUR_VARIABLE&gt;  keyword to detect end-of-file (last record encountered).  As well, for the initial pass of a DATA step execution, one technique is to use a RETAIN statement to set your own variable with a default value of 1 and then reset it to a zero.  So, for each of these conditions, you would use a RETURN, DELETE or do not issue an OUTPUT or PUT _INFILE_, depending on your particular SAS program execution requirements.&lt;BR /&gt;
&lt;BR /&gt;
The SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;   website has SAS-host documentation and also supplemental technical / conference topic papers -- you can either use the website SEARCH facility or here is a Google advanced search argument to locate some pertinent reference material on this topic:&lt;BR /&gt;
&lt;BR /&gt;
sas data step programming site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/YOUR_VARIABLE&gt;</description>
      <pubDate>Tue, 21 Jul 2009 14:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-to-delete-header-and-trailer-in-a-file/m-p/56795#M15896</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-07-21T14:10:43Z</dc:date>
    </item>
  </channel>
</rss>

