The SAS Output Delivery System and reporting techniques

create csv on mvs without printed output

Reply
New Contributor bcb
New Contributor
Posts: 2

create csv on mvs without printed output

So far I've not found an example of what I'm looking for. 

 

I know how to output a CSV file and email it using SAS 9.2 on z/OS using ODS CSV , PROC PRINT, and FILENAME OUTFILE EMAIL.  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. 

 

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..  For completeness, I did use the uniform and split options to create output that would contain meaningful headers.

 

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...

Super User
Super User
Posts: 8,349

Re: create csv on mvs without printed output

You can use proc export to create a csv file, its in the documentation.

You could create your csv via dataset and put statements.

 

I would really suggest however that email is not the way to send data.  Firstly it has size limitations and possible ther limitations depending on the IT group.  Secondly it is not secure when going anywhere other than internally, and even then may fail audit requirements.  Finally its not auditable, i.e. very little traceability.  Consider sending your file via FTP server, secure portal or something along those lines.

New Contributor bcb
New Contributor
Posts: 2

Re: create csv on mvs without printed output

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.
SAS Super FREQ
Posts: 8,951

Re: create csv on mvs without printed output

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.

cynthia
Super User
Posts: 11,765

Re: create csv on mvs without printed output

You may have the SAS supplied %ds2csv macro on your system.

If so something like:

%ds2csv(data=sashelp.class, runmode=B,csvfile=<your path>dummy.csv);

Ask a Question
Discussion stats
  • 4 replies
  • 111 views
  • 2 likes
  • 4 in conversation