How to save SAS Dataset in a c drive and acess it.
A) save dataset
here is something I've used to save excel file. how will it work for sas dataset
%let YYYYMM = 201703;
data _null_;
file cmds;
put "[save.as(%bquote("C:\Program Files\output\DataSet &YYYYMM..xlsx"))]";
put '[CLOSE()]';
run;
B) import dataset
can you please advise how to import dataset in a sas program
Thanks
A SAS dataset is stored in a library; a library definition (libname statement) connects a logical SAS library name with a physical path to an existing directory.
You do not "import" a SAS dataset into SAS. Datasets are read with proc sql ("from") or with the set or merge statements in a data step, or by naming them in the data= option in a procedure statement.
There are several ways to move SAS data to other applications; which one should be used has to be determined according to the external application and what exactly (just data, or whole reports) needs to be exported.
A SAS dataset is stored in a library; a library definition (libname statement) connects a logical SAS library name with a physical path to an existing directory.
You do not "import" a SAS dataset into SAS. Datasets are read with proc sql ("from") or with the set or merge statements in a data step, or by naming them in the data= option in a procedure statement.
There are several ways to move SAS data to other applications; which one should be used has to be determined according to the external application and what exactly (just data, or whole reports) needs to be exported.
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.