<?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: Issue with ds2csv utility in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900753#M355981</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You must use the correct macro variable reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2csv(data=input_table,labels=N,runmode=b,csvfile=&amp;amp;out.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The documentation of the macro can be found&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lebaseutilref/n0yo3bszlrh0byn1j4fxh4ndei8u.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So that document say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="p1at6eccukm26wn1bghe0bs469sg" class="xisDoc-argDescriptionPair"&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4 class="xisDoc-argument"&gt;csvfile=&lt;EM class="xisDoc-userSuppliedValue"&gt;external-filename&lt;/EM&gt;&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the name of the CSV file where the formatted output is to be written. If the file that you specify does not exist, then it is created for you.&lt;/P&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryNote"&gt;Note&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Do not use the CSVFILE argument if you use the CSVFREF argument.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;
&lt;DIV id="p07etpbxw8yzwkn1hp5ta34z9bg4" class="xisDoc-argDescriptionPair"&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4 class="xisDoc-argument"&gt;csvfref=&lt;EM class="xisDoc-userSuppliedValue"&gt;fileref&lt;/EM&gt;&lt;/H4&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the SAS fileref that points to the location of the CSV file where the formatted output is to be written. If the file that you specify does not exist, then it is created for you.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryNote"&gt;Note&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Do not use the CSVFREF argument if you use the CSVFILE argument.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So if they want to use the fileref DEST to write to HADOOP that was defined using the &amp;amp;OUT macro then they need to use CSVFREF parameter instead of CSVFILE parameter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2scv(...csvfref=dest)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 30 Oct 2023 17:44:02 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2023-10-30T17:44:02Z</dc:date>
    <item>
      <title>Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900739#M355973</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let out=/sas/output/file_name.csv;

filename dest hadoop "&amp;amp;out";

%ds2csv(data=input_table,labels=N,runmode=b,csvfile=out);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to create a csv file from dataset by only using ds2csv&lt;/P&gt;
&lt;P&gt;log shows csv successfully generated but I am not able to find it in specified hadoop destination folder.&lt;/P&gt;
&lt;P&gt;macro variable out is getting resolved correctly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;should i not give csvfile=libref in ds2csv utility. What is the issue?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900739#M355973</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-10-30T17:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900741#M355975</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried using dest as your last argument, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2csv(data=input_table,labels=N,runmode=b,csvfile=dest);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If this does not help then please share the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Replaced out with dest.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900741#M355975</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2023-10-30T17:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900744#M355976</link>
      <description>There is a small typing mistake in the code I have posted.&lt;BR /&gt;&lt;BR /&gt;csvfile=dest in ds2csv&lt;BR /&gt; ( not csvfile=out)</description>
      <pubDate>Mon, 30 Oct 2023 17:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900744#M355976</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-10-30T17:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900746#M355977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using another parameter &lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;csvfref&lt;/STRONG&gt;=dest&lt;/FONT&gt;&amp;nbsp;(in place of csvfile=dest):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2csv(data=input_table,labels=N,runmode=b,csvfref=dest);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:19:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900746#M355977</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2023-10-30T17:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900749#M355978</link>
      <description>&lt;P&gt;Can you write to the HADOOP area just using a simple a data step?&amp;nbsp; &amp;nbsp;For example try making a file with 3 columns and one row of data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file dest dsd;
  put 'a,b,c';
  put '1,2,3';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If so then the issue is how %DS2CSV() is writing the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you just use PROC EXPORT instead to write the CSV file to HADOOP?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=input_table file=dest dbms=csv;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900749#M355978</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-30T17:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900752#M355980</link>
      <description>&lt;P&gt;You must use the correct macro variable reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2csv(data=input_table,labels=N,runmode=b,csvfile=&amp;amp;out.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The documentation of the macro can be found&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lebaseutilref/n0yo3bszlrh0byn1j4fxh4ndei8u.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:34:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900752#M355980</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-30T17:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with ds2csv utility</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900753#M355981</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You must use the correct macro variable reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2csv(data=input_table,labels=N,runmode=b,csvfile=&amp;amp;out.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The documentation of the macro can be found&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lebaseutilref/n0yo3bszlrh0byn1j4fxh4ndei8u.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So that document say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="p1at6eccukm26wn1bghe0bs469sg" class="xisDoc-argDescriptionPair"&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4 class="xisDoc-argument"&gt;csvfile=&lt;EM class="xisDoc-userSuppliedValue"&gt;external-filename&lt;/EM&gt;&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the name of the CSV file where the formatted output is to be written. If the file that you specify does not exist, then it is created for you.&lt;/P&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryNote"&gt;Note&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Do not use the CSVFILE argument if you use the CSVFREF argument.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;
&lt;DIV id="p07etpbxw8yzwkn1hp5ta34z9bg4" class="xisDoc-argDescriptionPair"&gt;
&lt;BLOCKQUOTE&gt;
&lt;H4 class="xisDoc-argument"&gt;csvfref=&lt;EM class="xisDoc-userSuppliedValue"&gt;fileref&lt;/EM&gt;&lt;/H4&gt;
&lt;/BLOCKQUOTE&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the SAS fileref that points to the location of the CSV file where the formatted output is to be written. If the file that you specify does not exist, then it is created for you.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;BLOCKQUOTE&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryNote"&gt;Note&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;Do not use the CSVFREF argument if you use the CSVFILE argument.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So if they want to use the fileref DEST to write to HADOOP that was defined using the &amp;amp;OUT macro then they need to use CSVFREF parameter instead of CSVFILE parameter.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%ds2scv(...csvfref=dest)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Oct 2023 17:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-ds2csv-utility/m-p/900753#M355981</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-30T17:44:02Z</dc:date>
    </item>
  </channel>
</rss>

