<?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: proc export with special delimiter (section sign) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919399#M362140</link>
    <description>Thank you. With HEX code the delimiter works as expected.</description>
    <pubDate>Fri, 08 Mar 2024 04:34:01 GMT</pubDate>
    <dc:creator>SRAAM</dc:creator>
    <dc:date>2024-03-08T04:34:01Z</dc:date>
    <item>
      <title>proc export with special delimiter (section sign)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919120#M362035</link>
      <description>&lt;P&gt;I am using below proc export to generate a text file with&amp;nbsp; delimiter,&amp;nbsp;§&amp;nbsp; (section sign ALT + 0167) . it perfectly works in Windows but&amp;nbsp; not in Linux.&amp;nbsp; In Linux&amp;nbsp; the generated text file has expected delimiter in only Header but delimiter is changing within data.&amp;nbsp; how to solve this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc export data=sample&lt;/P&gt;&lt;P&gt;outfile=/user/home/results.txt dbms=dlm&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;delimiter="§";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:01:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919120#M362035</guid>
      <dc:creator>SRAAM</dc:creator>
      <dc:date>2024-03-06T15:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc export with special delimiter (section sign)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919211#M362067</link>
      <description>&lt;P&gt;What does the delimiter change to in Linux?&lt;/P&gt;
&lt;P&gt;Best might be to post 5 or 10 lines of the resulting exported file. Copy the the lines and then paste into a text box opened on the forum with the &amp;lt;/&amp;gt; icon that appears above the message window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data is at all sensitive use a SAS supplied data set like SASHELP.CLASS as the data= dataset.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 23:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919211#M362067</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-03-06T23:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc export with special delimiter (section sign)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919234#M362078</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;I've uploaded screenshot of txt file. the header&amp;nbsp; has the delimiter (§) as expected but delimiter changed within data.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 04:52:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919234#M362078</guid>
      <dc:creator>SRAAM</dc:creator>
      <dc:date>2024-03-07T04:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc export with special delimiter (section sign)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919237#M362081</link>
      <description>&lt;P&gt;Not a photograph.&amp;nbsp; The actual FILE.&lt;/P&gt;
&lt;P&gt;You can use the LIST statement.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile csv;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you have to the $HEX format to see what characters are in the file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile csv;
  input;
  put _infile_ $hex52.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that using some character that is not a plain old 7-bit ASCII code is going to cause you to have to worry about what ENCODING your SAS session is using and what ENCODING the tool you are using to look at the result is using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also when using some non-ASCII character it is usually best if you use the actual HEX CODE instead of pasting the non-standard character into your code so that it is portable and does not get transcoded when you move the code to another environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use 'A7'X (since I am using LATIN1 encoding) it works fine for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
 set sashelp.class(obs=2);
run;

filename csv temp;
proc export data=test file=csv replace dbms=csv;
  delimiter='A7'x;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;PRE&gt;244  data _null_;
245    infile csv;
246    input;
247    put _infile_ $hex52.;
248  run;

NOTE: The infile CSV is:
      (system-specific pathname),
      (system-specific file attributes)

4E616D65A7536578A7416765A7486569676874A7576569676874
416C66726564A74DA73134A73639A73131322E35
416C696365A746A73133A735362E35A73834
NOTE: 3 records were read from the infile (system-specific pathname).
      The minimum record length was 18.
      The maximum record length was 26.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

249  data _null_;
250    infile csv;
251    input;
252    list;
253  run;

NOTE: The infile CSV is:
      (system-specific pathname),
      (system-specific file attributes)

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
1         Name§Sex§Age§Height§Weight 26
2         Alfred§M§14§69§112.5 20
3         Alice§F§13§56.5§84 18
NOTE: 3 records were read from the infile (system-specific pathname).
      The minimum record length was 18.
      The maximum record length was 26.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Mar 2024 05:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919237#M362081</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-07T05:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc export with special delimiter (section sign)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919399#M362140</link>
      <description>Thank you. With HEX code the delimiter works as expected.</description>
      <pubDate>Fri, 08 Mar 2024 04:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-export-with-special-delimiter-section-sign/m-p/919399#M362140</guid>
      <dc:creator>SRAAM</dc:creator>
      <dc:date>2024-03-08T04:34:01Z</dc:date>
    </item>
  </channel>
</rss>

