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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.