09-11-2017 11:01 AM
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...
09-11-2017 11:10 AM
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.
09-11-2017 12:58 PM
09-11-2017 01:25 PM
09-11-2017 03:49 PM
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);