<?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: CSV output not appearing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336560#M272480</link>
    <description>&lt;P&gt;&lt;BR /&gt;libname in1 '/a/b/c' ;&lt;/P&gt;&lt;P&gt;filename csvout '/d/e/list.csv' &amp;nbsp;lrecl=1000 &amp;nbsp; recfm=v;&lt;/P&gt;&lt;P&gt;DATA TEMP;&lt;BR /&gt;SET in1;&lt;BR /&gt;KEEP g h;&lt;BR /&gt;IF '24FEB17:00:00'DT &amp;lt; STARTIME &amp;lt; '24FEB17:24:00'DT;&lt;BR /&gt;IF g IN: (&lt;BR /&gt;'x',&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;IF h IN:(&lt;BR /&gt;'y',&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;PROC SORT NODUP DATA=TEMP; BY x y;&lt;BR /&gt;&lt;BR /&gt;PROC PRINT NOOBS UNIFORM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;313 PROC PRINT NOOBS UNIFORM;&lt;BR /&gt;NOTE: There were 100010 observations read from the data set WORK.TEMP.&lt;BR /&gt;NOTE: The PROCEDURE PRINT printed pages 1-1786.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no errors or anything which speaks to the csv. &amp;nbsp;I did a search an the only occurance of csv is in my filename statement. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 13:59:27 GMT</pubDate>
    <dc:creator>prolifious</dc:creator>
    <dc:date>2017-02-28T13:59:27Z</dc:date>
    <item>
      <title>CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336554#M272478</link>
      <description>&lt;P&gt;I'm able to run the job and read the sas ouput file, but i can't seem to get the filename csvout '...' to spit out the csv. &amp;nbsp;my output statement notes 100k observations with 9 variables. &amp;nbsp; &amp;nbsp;in the filename statement, i've tried lrecl=500, 1000, i didn't include it at all. &amp;nbsp;I've also tried recfm=v, and leaving it out. &amp;nbsp;any ideas why this csv is not being generated? &amp;nbsp;i get the log and the output, with all 100k records, but i cant get the csv. &amp;nbsp;I've looked through the log and theres nothing noting a probelm with the csv output.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 13:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336554#M272478</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2017-02-28T13:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336559#M272479</link>
      <description>&lt;P&gt;Please post your code. And the log of the data step that is supposed to create the csv.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 13:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336559#M272479</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-28T13:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336560#M272480</link>
      <description>&lt;P&gt;&lt;BR /&gt;libname in1 '/a/b/c' ;&lt;/P&gt;&lt;P&gt;filename csvout '/d/e/list.csv' &amp;nbsp;lrecl=1000 &amp;nbsp; recfm=v;&lt;/P&gt;&lt;P&gt;DATA TEMP;&lt;BR /&gt;SET in1;&lt;BR /&gt;KEEP g h;&lt;BR /&gt;IF '24FEB17:00:00'DT &amp;lt; STARTIME &amp;lt; '24FEB17:24:00'DT;&lt;BR /&gt;IF g IN: (&lt;BR /&gt;'x',&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;IF h IN:(&lt;BR /&gt;'y',&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;PROC SORT NODUP DATA=TEMP; BY x y;&lt;BR /&gt;&lt;BR /&gt;PROC PRINT NOOBS UNIFORM;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;313 PROC PRINT NOOBS UNIFORM;&lt;BR /&gt;NOTE: There were 100010 observations read from the data set WORK.TEMP.&lt;BR /&gt;NOTE: The PROCEDURE PRINT printed pages 1-1786.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no errors or anything which speaks to the csv. &amp;nbsp;I did a search an the only occurance of csv is in my filename statement. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 13:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336560#M272480</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2017-02-28T13:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336561#M272481</link>
      <description>&lt;P&gt;please excuse the smiley sad haha&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 14:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336561#M272481</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2017-02-28T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336563#M272482</link>
      <description>&lt;P&gt;First of all, post your code using the "little running man" symbol or the {i}. This preserves formatting and prevents the display of smileys.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in1 '/a/b/c' ;

filename csvout '/d/e/list.csv'  lrecl=1000   recfm=v;

DATA TEMP;
SET in1;
KEEP g h;
IF '24FEB17:00:00'DT &amp;lt; STARTIME &amp;lt; '24FEB17:24:00'DT;
IF g IN: (
'x',
);

IF h IN:(
'y',
;

PROC SORT NODUP DATA=TEMP; BY x y;

PROC PRINT NOOBS UNIFORM;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You only define a filename. If you never use the file reference defined here, nothing is ever written to the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other problems with your code, see my comments:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname in1 '/a/b/c' ;

filename csvout '/d/e/list.csv'  lrecl=1000   recfm=v;

data temp;
set in1; /* this does not read from library in1, but from dataset work.in1! */
keep g h;
if
  '24FEB17:00:00'DT &amp;lt; STARTIME &amp;lt; '24FEB17:24:00'DT
  and g IN ('x')
  and h IN ('y')
;
run;

/* at this point, work.temp contains only variables g and h */

proc sort
  data=TEMP
  nodupkey
;
by x y; /* this won't work, as no variable x or y has been created in one of the previous steps */
run;

data _null_;
set TEMP;
file csvout dlm=',' dsd;
if _n_ = 1 then put 'g;h';
put g h;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 14:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336563#M272482</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-28T14:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: CSV output not appearing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336569#M272483</link>
      <description>&lt;P&gt;Thank you for point out the little running man. &amp;nbsp;I'll be aware of that for next time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up running this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods csv file='/a/b/list.csv';&lt;BR /&gt;PROC PRINT data = temp NOOBS UNIFORM;&lt;BR /&gt;run;&lt;BR /&gt;ods csv close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my csv was output with no problems. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I codejacked that filename csvout from another job. &amp;nbsp;I need to be better about choosing which statements to use, and learn the differences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for taking the time to help me, Kurt.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 14:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-output-not-appearing/m-p/336569#M272483</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2017-02-28T14:20:45Z</dc:date>
    </item>
  </channel>
</rss>

