<?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 delimiter issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668100#M200191</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a .txt file using proc export from sas dataset using pipe delimiter. But in data, there is a pipe value in the field causing us the major problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way&amp;nbsp; can we introduce a escape char or single / doubles quotes in the field where we get the pipe value. Please advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 16:53:53 GMT</pubDate>
    <dc:creator>helannivas88</dc:creator>
    <dc:date>2020-07-09T16:53:53Z</dc:date>
    <item>
      <title>Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668100#M200191</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a .txt file using proc export from sas dataset using pipe delimiter. But in data, there is a pipe value in the field causing us the major problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way&amp;nbsp; can we introduce a escape char or single / doubles quotes in the field where we get the pipe value. Please advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 16:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668100#M200191</guid>
      <dc:creator>helannivas88</dc:creator>
      <dc:date>2020-07-09T16:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668108#M200194</link>
      <description>PROC EXPORT will mask delimiters in the character fields automatically, by adding quotes around it. &lt;BR /&gt;&lt;BR /&gt;A data step export will not. Please show your code &amp;amp; log if you're having issues with PROC EXPORT. Note that PROC EXPORT is not the same as the GUI tasks either, especially in EG and Studio.&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2020 17:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668108#M200194</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-09T17:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668111#M200195</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/182470"&gt;@helannivas88&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;I'm trying to create a .txt file using proc export from sas dataset using pipe delimiter. But in data, there is a pipe value in the field causing us the major problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way&amp;nbsp; can we introduce a escape char or single / doubles quotes in the field where we get the pipe value. Please advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please describe the "major problem" you are having. Any value that contains a delimiter character that is exported with Proc Export will have the entire string enclosed in quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run this code (modified to export to a location on your system)&lt;/P&gt;
&lt;PRE&gt;data pipe;
   x='string with| in the middle';
   y='String without';
run;

proc export data=pipe
   outfile="&amp;lt;path&amp;gt;\pipe.txt"
   dbms=dlm replace;
   delimiter='|';
run;&lt;/PRE&gt;
&lt;P&gt;The resulting file will look like:&lt;/P&gt;
&lt;PRE&gt;x|y
"string with| in the middle"|String without&lt;/PRE&gt;
&lt;P&gt;So, we kind of need to know the exact problem you have with using the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 17:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668111#M200195</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-09T17:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668115#M200198</link>
      <description>&lt;P&gt;This code already puts the data in quotes&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _new;
informat have $32.;
input have $ var2;
want=compress(compress(have,' +/*-%','A'));
cards;
BIOL1012|8DCWc	10128
ANT102	102
PSY125	125
SOC101	101
SPAN2330	2330
HIST1500	1500
BCS-205	205
BCS-132	132
;;;
run;

proc export data=_new outfile='test.csv'
dbms=dlm replace ;
delimiter='|' ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jul 2020 17:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668115#M200198</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-07-09T17:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668122#M200214</link>
      <description>Please don't use CSV extension on files that are not comma or semicolon delimited.</description>
      <pubDate>Thu, 09 Jul 2020 17:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/668122#M200214</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-09T17:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc export delimiter issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/919130#M362040</link>
      <description>I used same code and ran it in Linux. I did not see data enclosed in double quotes . Why the default behavior not working in Linux for me</description>
      <pubDate>Wed, 06 Mar 2024 15:33:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-export-delimiter-issue/m-p/919130#M362040</guid>
      <dc:creator>SRAAM</dc:creator>
      <dc:date>2024-03-06T15:33:12Z</dc:date>
    </item>
  </channel>
</rss>

