<?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: Exporting SAS dataset into .txt file readable by Access (delimiter preferably ' | ' pipe line). in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473868#M121660</link>
    <description>&lt;P&gt;I see data in one variable rolling over next.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gets exported, but in the txt file it gives double pipeline somewhere in the middle of variable sequence, i guess double delimiter is to indicate end of record, and should be end of record.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 18:38:41 GMT</pubDate>
    <dc:creator>vpgodbole</dc:creator>
    <dc:date>2018-06-27T18:38:41Z</dc:date>
    <item>
      <title>Exporting SAS dataset into .txt file readable by Access (delimiter preferably ' | ' pipe line).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473841#M121642</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw this question posted, but could not find&amp;nbsp;Access part anywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to export&amp;nbsp;SAS dataset into .txt because i want it to be imported into Access. Prefer Pipe line as delimiter as my data has spaces, commas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using Proc export .. looks like txt export doesn't work on Windows,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried data _null_ method, however, when i import in Access the End of record is not detected. Variables get split.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Please advice. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the codes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file "/data/cs/Users/Varun_Godbole/Sc2_20180626.txt" DLM='|' ;&lt;/P&gt;&lt;P&gt;set c2339197.Sc2 (obs=500) ;&lt;/P&gt;&lt;P&gt;put _all_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data=c2339197.Sc2 (obs=500) outfile='/data/cs/Users/Varun_Godbole/Sc2_20180626.txt' dbms=dlm&lt;BR /&gt;replace;&lt;BR /&gt;delimiter='|';&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 17:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473841#M121642</guid>
      <dc:creator>vpgodbole</dc:creator>
      <dc:date>2018-06-27T17:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS dataset into .txt file readable by Access (delimiter preferably ' | ' pipe line).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473843#M121643</link>
      <description>&lt;P&gt;What error are you getting when you try to import the txt file produced by the proc export?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 17:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473843#M121643</guid>
      <dc:creator>ybolduc</dc:creator>
      <dc:date>2018-06-27T17:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS dataset into .txt file readable by Access (delimiter preferably ' | ' pipe line).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473868#M121660</link>
      <description>&lt;P&gt;I see data in one variable rolling over next.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gets exported, but in the txt file it gives double pipeline somewhere in the middle of variable sequence, i guess double delimiter is to indicate end of record, and should be end of record.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 18:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473868#M121660</guid>
      <dc:creator>vpgodbole</dc:creator>
      <dc:date>2018-06-27T18:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS dataset into .txt file readable by Access (delimiter preferably ' | ' pipe line).</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473899#M121668</link>
      <description>&lt;P&gt;Two or more consecutive delimiters in the Proc Export occurs when&amp;nbsp;one or more&amp;nbsp;variables are missing for that row of data.&lt;/P&gt;
&lt;P&gt;Depending on how you import the file into Access you should get either a blank or NULL value for the variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example code and results. You can see the double || after each F for the Sex column because all of the values for age were removed in the data step.&lt;/P&gt;
&lt;PRE&gt;data work.junk;
   set sashelp.class;
   if sex='F' then age=.;
run;

proc export data=work.junk
     outfile="x:\example.txt"
     dbms=dlm
     replace;
     delimiter='|';
run;

Results:
Name|Sex|Age|Height|Weight
Alfred|M|14|69|112.5
Alice|F||56.5|84
Barbara|F||65.3|98
Carol|F||62.8|102.5
Henry|M|14|63.5|102.5
James|M|12|57.3|83
Jane|F||59.8|84.5
Janet|F||62.5|112.5
Jeffrey|M|13|62.5|84
John|M|12|59|99.5
Joyce|F||51.3|50.5
Judy|F||64.3|90
Louise|F||56.3|77
Mary|F||66.5|112
Philip|M|16|72|150
Robert|M|12|64.8|128
Ronald|M|15|67|133
Thomas|M|11|57.5|85
William|M|15|66.5|112&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jun 2018 19:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-SAS-dataset-into-txt-file-readable-by-Access-delimiter/m-p/473899#M121668</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-27T19:56:46Z</dc:date>
    </item>
  </channel>
</rss>

