<?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 Data Set to Flat Text File in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25449#M4447</link>
    <description>Yes, there is. Depending on your expertise with SAS, you can export the data using the Export Wizard and select a space ( ) character as the delimiter or you can write a DATA _NULL_ program and use PUT statements to create your flat file. There are many examples in the documentation of creating flat files using SAS.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 20 May 2010 19:57:16 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-05-20T19:57:16Z</dc:date>
    <item>
      <title>SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25448#M4446</link>
      <description>Hi!&lt;BR /&gt;
&lt;BR /&gt;
Is there any way that I can convert a SAS data set to a flat text file (with no delimiters)?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Thu, 20 May 2010 19:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25448#M4446</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-05-20T19:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25449#M4447</link>
      <description>Yes, there is. Depending on your expertise with SAS, you can export the data using the Export Wizard and select a space ( ) character as the delimiter or you can write a DATA _NULL_ program and use PUT statements to create your flat file. There are many examples in the documentation of creating flat files using SAS.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 20 May 2010 19:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25449#M4447</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-20T19:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25450#M4448</link>
      <description>It looks like Patrick give a solution in the preceding posts.&lt;BR /&gt;
Such as :&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  file 'd:\download\class.txt';&lt;BR /&gt;
  put name= +1 / sex= +1 / age= +1 /;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
It is what you want.</description>
      <pubDate>Fri, 21 May 2010 15:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25450#M4448</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-21T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25451#M4449</link>
      <description>Hi!&lt;BR /&gt;
You can search what you are looking for in sas forum.</description>
      <pubDate>Fri, 21 May 2010 15:42:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25451#M4449</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2010-05-21T15:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25452#M4450</link>
      <description>Hi&lt;BR /&gt;
A data step version writing the values of all variable of a data set to an external file without delimiters.&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
  format b z5.;&lt;BR /&gt;
  a='  abc ';&lt;BR /&gt;
  b=1;&lt;BR /&gt;
  c=' Just a test';&lt;BR /&gt;
  d=1234456778;&lt;BR /&gt;
  e=' The end';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql noprint;&lt;BR /&gt;
  select strip(name) into :PutVarList separated by ' +(-1) '&lt;BR /&gt;
    from dictionary.columns&lt;BR /&gt;
      where libname='WORK' and memname='TEST'&lt;BR /&gt;
  ;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
%put PutVarList= &amp;amp;PutVarList;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set test;&lt;BR /&gt;
file print;&lt;BR /&gt;
put &amp;amp;PutVarList;&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 22 May 2010 00:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25452#M4450</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-05-22T00:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Data Set to Flat Text File</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25453#M4451</link>
      <description>Seems to me that creating a file with no delimiter, space or otherwise, can only be useful if the length of each field is fixed. You cannot use LIST PUT for that you &lt;BR /&gt;
would need to use column or formatted put. For example.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
put a z5. b f8. c$20. d f12. e $16.; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Patrick,&lt;BR /&gt;
&lt;BR /&gt;
You can make your program much shorter if you take avantage of features of the PUT statement.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   set test;&lt;BR /&gt;
   file print;&lt;BR /&gt;
   put (_all_) (+(-1));&lt;BR /&gt;
   run; &lt;BR /&gt;
[/pre]</description>
      <pubDate>Sat, 22 May 2010 19:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Data-Set-to-Flat-Text-File/m-p/25453#M4451</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-05-22T19:44:11Z</dc:date>
    </item>
  </channel>
</rss>

