<?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: Trailer record in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69036#M14997</link>
    <description>Thanks Scott for the quick response.  I've got all of the files created successfully now</description>
    <pubDate>Wed, 02 Sep 2009 19:26:33 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-09-02T19:26:33Z</dc:date>
    <item>
      <title>Trailer record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69034#M14995</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I need to create several txt files with a header record, detail records, and trailer record with a record count.  I'm using data _null_ within a macro.  I have&lt;BR /&gt;
if _n_ = 1 then put @1 'header info'&lt;BR /&gt;
&lt;BR /&gt;
set temp end = eof;&lt;BR /&gt;
count + 1;&lt;BR /&gt;
put @1 ....;&lt;BR /&gt;
&lt;BR /&gt;
if eof then put &lt;BR /&gt;
@1 'trailer record' &lt;BR /&gt;
@20 count;&lt;BR /&gt;
&lt;BR /&gt;
My problem is one of the several datasets is empty and therefore there is no eof so it isn't putting a trailer record.&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions?  Thanks for your help</description>
      <pubDate>Wed, 02 Sep 2009 18:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69034#M14995</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-02T18:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trailer record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69035#M14996</link>
      <description>You will need to add NOBS=OBSCOUNT (or like code) to your SET statement, and then (one approach) add IF/THEN DO/END logic *BEFORE* the SET statement to generate a HEADER/TRAILER or whatever needed when you have OBSCOUNT=0 for your input file.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 02 Sep 2009 19:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69035#M14996</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-09-02T19:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trailer record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69036#M14997</link>
      <description>Thanks Scott for the quick response.  I've got all of the files created successfully now</description>
      <pubDate>Wed, 02 Sep 2009 19:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trailer-record/m-p/69036#M14997</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-02T19:26:33Z</dc:date>
    </item>
  </channel>
</rss>

