<?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: create csv on mvs without printed output in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394875#M19314</link>
    <description>&lt;P&gt;You may have the SAS supplied %ds2csv macro on your system.&lt;/P&gt;
&lt;P&gt;If so something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT color="#bf0060" face="SAS Monospace" size="2"&gt;ds2csv&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=sashelp.class, runmode=B,csvfile=&amp;lt;your path&amp;gt;dummy.csv);&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 19:49:01 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-09-11T19:49:01Z</dc:date>
    <item>
      <title>create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394703#M19305</link>
      <description>&lt;P&gt;So far I've not found an example of what I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to output a CSV file and email it using SAS 9.2 on z/OS using &lt;STRONG&gt;ODS CSV&lt;/STRONG&gt; , &lt;STRONG&gt;PROC PRINT, &lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;FILENAME OUTFILE EMAIL&lt;/STRONG&gt;.&amp;nbsp; Problem is that for a dataset of even modest size (my dataset was 280K obs with 31 variables), the PROC PRINT processing takes a long time to run and consumes a lot of CPU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to get a CSV created without printed output from PROC print? My job took 45 minutes and consumed ten minutes of CPU..&amp;nbsp; For completeness, I did use the uniform and split options to create output that would contain meaningful headers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have access to SAS EG and could probably get it to connect and read this file, but I'm a casual user of that, and only slightly more than a casual user of SAS z/OS...&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394703#M19305</guid>
      <dc:creator>bcb</dc:creator>
      <dc:date>2017-09-11T15:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394709#M19306</link>
      <description>&lt;P&gt;You can use proc export to create a csv file, its in the documentation.&lt;/P&gt;
&lt;P&gt;You could create your csv via dataset and put statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would really suggest however that email is not the way to send data. &amp;nbsp;Firstly it has size limitations and possible ther limitations depending on the IT group. &amp;nbsp;Secondly it is not secure when going anywhere other than internally, and even then may fail audit requirements. &amp;nbsp;Finally its not auditable, i.e. very little traceability. &amp;nbsp;Consider sending your file via FTP server, secure portal or something along those lines.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:10:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394709#M19306</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-09-11T15:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394744#M19308</link>
      <description>I am presently putting via ODS redirection, which is quick and easy, but burns a lot of CPU. PROC export is NOT available on z/OS. I already looked at that.&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394744#M19308</guid>
      <dc:creator>bcb</dc:creator>
      <dc:date>2017-09-11T16:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394768#M19309</link>
      <description>You can always use a DATA step with PUT statements to write your own CSV file. I don't know whether it would be faster than ODS...it might be.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Mon, 11 Sep 2017 17:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394768#M19309</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-09-11T17:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394875#M19314</link>
      <description>&lt;P&gt;You may have the SAS supplied %ds2csv macro on your system.&lt;/P&gt;
&lt;P&gt;If so something like:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="2"&gt;%&lt;/FONT&gt;&lt;FONT color="#bf0060" face="SAS Monospace" size="2"&gt;ds2csv&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="2"&gt;=sashelp.class, runmode=B,csvfile=&amp;lt;your path&amp;gt;dummy.csv);&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 19:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/394875#M19314</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-11T19:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834838#M25941</link>
      <description>&lt;P&gt;Were you able to solve the issue? I'm facing the same problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 14:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834838#M25941</guid>
      <dc:creator>marko_kruz</dc:creator>
      <dc:date>2022-09-23T14:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834848#M25943</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434686"&gt;@marko_kruz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Were you able to solve the issue? I'm facing the same problem &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can write a CSV file with a simple data step.&amp;nbsp; If you are running on MVS then lets assume you already have a FILEREF or even just a DDNAME created named CSV that points to where you want the CSV file written.&amp;nbsp; Let's assume the dataset you want to write out is named have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To write a CSV file without a header line just use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file csv dsd ;
  set have;
  put (_all_) (+0);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you also need to write the header line then add a little bit more code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have(obs=0) out=names;
  var _all_;
run;
data _null_;
  file csv dsd ;
  set names ;
  put _name_ @ ;
run;
data _null_;
  file csv dsd mod;
  set have;
  put (_all_) (+0);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 14:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834848#M25943</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-09-23T14:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834865#M25944</link>
      <description>&lt;P&gt;What about ODS _destination_ none;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing select none;
ods csv file ='...;
proc print data=....;
run;
ods csv close;
ods listing select all;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/05/26/suppress-ods.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/08/03/ods-destinations-select-list.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/08/03/ods-destinations-select-list.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/05/28/five-reasons-ods-exclude.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/05/28/five-reasons-ods-exclude.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/11/19/select-ods-tables-wildcards-regular-expressions-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/11/19/select-ods-tables-wildcards-regular-expressions-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 15:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834865#M25944</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-23T15:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: create csv on mvs without printed output</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834869#M25945</link>
      <description>&lt;P&gt;Just use a DATA step to write the file.&lt;/P&gt;
&lt;P&gt;The particulars for MVS (z/OS) have to go into the FILE statement. RECFM, LRECL etc.&lt;/P&gt;
&lt;P&gt;Conversion from EBCDIC to ASCII will be done when the file is downloaded to UNIX/Windows.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 16:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/create-csv-on-mvs-without-printed-output/m-p/834869#M25945</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-23T16:02:55Z</dc:date>
    </item>
  </channel>
</rss>

