<?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 Proc export issue in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719799#M38176</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My work table has 10 columns which i am trying to export this into .txt file using proc export using "|" delimiter.&lt;/P&gt;
&lt;P&gt;Ideally the txt file must contain 9 pipe ("|") symbols separating the 10 columns but here since the last 2 columns has null values in the input data , it has only 8 pipe ("|") symbols and the last column is getting truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for Example ;&lt;/P&gt;
&lt;P&gt;Proc export data = a.txt&lt;/P&gt;
&lt;P&gt;outfile= b.txt&lt;/P&gt;
&lt;P&gt;dbms=dlm replace;&lt;/P&gt;
&lt;P&gt;delimiter="|";&lt;/P&gt;
&lt;P&gt;putnames=NO;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated if anything needed to be included in the proc export option&lt;/P&gt;
&lt;P&gt;which would solve my issue.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Feb 2021 05:17:57 GMT</pubDate>
    <dc:creator>laxmanpai</dc:creator>
    <dc:date>2021-02-17T05:17:57Z</dc:date>
    <item>
      <title>Proc export issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719799#M38176</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My work table has 10 columns which i am trying to export this into .txt file using proc export using "|" delimiter.&lt;/P&gt;
&lt;P&gt;Ideally the txt file must contain 9 pipe ("|") symbols separating the 10 columns but here since the last 2 columns has null values in the input data , it has only 8 pipe ("|") symbols and the last column is getting truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for Example ;&lt;/P&gt;
&lt;P&gt;Proc export data = a.txt&lt;/P&gt;
&lt;P&gt;outfile= b.txt&lt;/P&gt;
&lt;P&gt;dbms=dlm replace;&lt;/P&gt;
&lt;P&gt;delimiter="|";&lt;/P&gt;
&lt;P&gt;putnames=NO;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be much appreciated if anything needed to be included in the proc export option&lt;/P&gt;
&lt;P&gt;which would solve my issue.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 05:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719799#M38176</guid>
      <dc:creator>laxmanpai</dc:creator>
      <dc:date>2021-02-17T05:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719804#M38177</link>
      <description>&lt;P&gt;Can you share an reproducible example?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;FYI - There is no need to use PROC EXPORT to produce a delimited file, especially one without a header row. A simple PUT statement will do the job.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set mylib.myds ;
  file 'myfile.txt' dsd dlm='|';
  put (_all_) (+0);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Feb 2021 05:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719804#M38177</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-02-17T05:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719820#M38180</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/28829"&gt;@laxmanpai&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My work table has 10 columns which i am trying to export this into .txt file using proc export using "|" delimiter.&lt;/P&gt;
&lt;P&gt;Ideally the txt file must contain 9 pipe ("|") symbols separating the 10 columns but here since the last 2 columns has null values in the input data , it has only 8 pipe ("|") symbols and the last column is getting truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This does not happen using SAS 9.4m5:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
   set sashelp.class;

   length Empty1 8 Empty2 $ 10;

   call missing(of Empty:);
run;

proc export data=work.class 
      file= "class_pipe.txt"
      dbms=dlm
      replace;
   delimiter='|';
   putnames=no;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;Alfred|M|14|69|112.5||
Alice|F|13|56.5|84||
Barbara|F|13|65.3|98||
Carol|F|14|62.8|102.5||
Henry|M|14|63.5|102.5||
James|M|12|57.3|83||
Jane|F|12|59.8|84.5||
Janet|F|15|62.5|112.5||
Jeffrey|M|13|62.5|84||
John|M|12|59|99.5||
Joyce|F|11|51.3|50.5||
Judy|F|14|64.3|90||
Louise|F|12|56.3|77||
Mary|F|15|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, 17 Feb 2021 07:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719820#M38180</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-02-17T07:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719850#M38184</link>
      <description>&lt;P&gt;Show us the LOG from when you run the code. Copy the entire code for the step involved plus all notes and messages from the LOG. Paste into a text box opened on this forum with the &amp;lt;/&amp;gt; icon to preserve formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, which program did you use to open the text file and examine the contents?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You say "it has only 8 pipe ("|") symbols and the last column is getting truncated.". Is this truncation on the the line with only 8 pipe symbols or on other lines? I ask because you say the 8 pipes occurs where the last two columns are "null" values. So how would tell that a missing last column&amp;nbsp; is truncated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If any of your variables contain a linefeed and/or carriage return character you might be seeing the result from the content of your data. Does it appear that a line of data might only have one or two | symbols with very short data?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 10:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/719850#M38184</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-17T10:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export issue</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/728055#M38379</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;for the simple and elegant example.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 00:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Proc-export-issue/m-p/728055#M38379</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-03-22T00:44:41Z</dc:date>
    </item>
  </channel>
</rss>

