<?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 to csv remove starting pipe in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511103#M15849</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/243552"&gt;@jim_toby&lt;/a&gt;&amp;nbsp;You have two file statements and that usually results in the last one being used, so the options from the first FILE statement are ignored. Make sure you only have one.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2018 17:51:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-07T17:51:57Z</dc:date>
    <item>
      <title>SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511080#M15844</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm writing code that will convert SAS to CSV and it seems like everything is working however, I want my csv which is delimited by a pipe to not start a new row with a pipe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example here is how my file currently looks:&lt;/P&gt;&lt;P&gt;|value1|value2|value3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is how I want it to look:&lt;/P&gt;&lt;P&gt;value1|value2|value3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my SAS Code:\&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _null_;
	SET MySAS.SasTable; /*MySAS is the path to my SAS Table*/
	FILE &amp;amp;outfile; /*outfile is where my csv file will be created*/
	put (_all_) ('|');
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone help me resolve this issue? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511080#M15844</guid>
      <dc:creator>jim_toby</dc:creator>
      <dc:date>2018-11-07T16:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511084#M15846</link>
      <description>&lt;P&gt;You should add the DLM&amp;nbsp;and DSD options to the FILE statement and not print the delimiter in the PUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;6    data _null_;
7       file log dsd dlm='|';
8       set sashelp.class;
9       put (_all_)(:);
10      run;

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
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511084#M15846</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-11-07T16:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511101#M15847</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;so here is what I have based on your code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _null_;
        file log dsd dlm= '|';
	SET MySAS.SasTable; /*MySAS is the path to my SAS Table*/
	FILE &amp;amp;outfile; /*outfile is where my csv file will be created*/
	put (_all_) (:);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And all it seems to be doing is putting black spaces between each record. So the delimiter never even shows up&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511101#M15847</guid>
      <dc:creator>jim_toby</dc:creator>
      <dc:date>2018-11-07T17:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511102#M15848</link>
      <description>&lt;P&gt;You need to put the DLM and DSD options on your FILE &amp;amp;OUTFILE file statement.&amp;nbsp; My program is an example not a template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/243552"&gt;@jim_toby&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;so here is what I have based on your code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _null_;
        file log dsd dlm= '|';
	SET MySAS.SasTable; /*MySAS is the path to my SAS Table*/
	FILE &amp;amp;outfile; /*outfile is where my csv file will be created*/
	put (_all_) (:);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And all it seems to be doing is putting black spaces between each record. So the delimiter never even shows up&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511102#M15848</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2018-11-07T17:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511103#M15849</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/243552"&gt;@jim_toby&lt;/a&gt;&amp;nbsp;You have two file statements and that usually results in the last one being used, so the options from the first FILE statement are ignored. Make sure you only have one.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 17:51:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511103#M15849</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-07T17:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511108#M15850</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;Thanks for the heads up, I completely missed the first file statement!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 18:18:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511108#M15850</guid>
      <dc:creator>jim_toby</dc:creator>
      <dc:date>2018-11-07T18:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to csv remove starting pipe</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511109#M15851</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;thanks it worked!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 18:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-to-csv-remove-starting-pipe/m-p/511109#M15851</guid>
      <dc:creator>jim_toby</dc:creator>
      <dc:date>2018-11-07T18:19:06Z</dc:date>
    </item>
  </channel>
</rss>

