<?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: Output text file with header record in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228210#M41199</link>
    <description>&lt;P&gt;PROC EXPORT with DBMS=TAB will do what you want&lt;/P&gt;</description>
    <pubDate>Fri, 02 Oct 2015 14:01:12 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2015-10-02T14:01:12Z</dc:date>
    <item>
      <title>Output text file with header record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228205#M41196</link>
      <description>&lt;P&gt;I would like to know how to output a tab delimited text file with the first header record being the field names.&lt;/P&gt;&lt;P&gt;I used if _n_=1 to insert header record but it did not work.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 13:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228205#M41196</guid>
      <dc:creator>EYend</dc:creator>
      <dc:date>2015-10-02T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Output text file with header record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228209#M41198</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like (note that I would recommend comma separated, tabs are too application specific):&lt;/P&gt;
&lt;PRE&gt;proc sql noprint;
  select distinct NAME 
  into  :VLIST separated by " "
  from  SASHELP.VCOLUMN
  where LIBNAME="SASHELP"
    and MEMNAME="CARS";
quit;

data _null_;
  set sashelp.cars;
  file "s:\temp\rob\temp.txt" dlm=",";
  if _n_=1 then do;
    temp=tranwrd("&amp;amp;vlist."," ",",");
    put temp;
    put &amp;amp;vlist.;
  end;
  else put &amp;amp;vlist.;
run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Oct 2015 13:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228209#M41198</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-10-02T13:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Output text file with header record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228210#M41199</link>
      <description>&lt;P&gt;PROC EXPORT with DBMS=TAB will do what you want&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 14:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Output-text-file-with-header-record/m-p/228210#M41199</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-02T14:01:12Z</dc:date>
    </item>
  </channel>
</rss>

