All,
ods csv file="ODS_CSV.csv";
proc print data=sashelp.class;
title "&sysver";
footnote "&sysdate";
run;
ods csv close;
What do you mean by "not correctly populated"?
And why so complicated? A simple PROC EXPORT does the same (minus the observation numbers), and will perform better.
And I suspect there is a dedicated export task in DI Studio.
Anyway, look at the log of the job that did not work as expected.
Since PROC EXPORT creates a data step and runs it, it will outperform ODS CSV, by orders of magnitude once the size of the data grows.
And if you have an export task available in DI Studio, it is recommended to use that. The less user-written code, the easier to work with (if you are a DI user, which I am not).
@sathya66 wrote:
Yes, I used PROC EXPORT insated of ods csv . this is a user written code and not using proper DI.
its just not exporting the CSV file.
which one is best? is it PROC EXPORT or ODS CSV?
What exactly does the LOG show from that part of the job?
@sathya66 wrote:
It is executing fine without errors but not saving the file on the server. its strange.
The log should show exactly where the file was written. The log after the ODS CLOSE should show something like
NOTE: Writing CSV file: X:\<path information>\<filename.csv>
as appropriate for your operating system and code
Hello @sathya66
I suggest you give the full path in the statement ods csv file="/full_path_here/ODS_CSV.csv";
Please check your DI job settings.
Please share your outcome
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.