Hi, I have a sas data set file which is pola_201707 which is save it with my previous sas program , now I want to read it in a new sas program and then get copy the same whole sas data set but with another name which is pcy_201707 and save it as another library name pcy2017
Both have the same data but just the name and the library name is different. How can I do with this?
Below is my code to read my previous saved sas data set pola_clm_mth_201707.
libname pl "C:\Data\DBF";
data pl.pola_201707;
set pl.pola_201707;
run;
You need to use the libname-statment for each library you want to use. Then use something like
data pcy2017.pcy_201707;
set pl.pola_201707;
run;
if the dataset is small. For larger datasets using proc datasets with copy + change is recommended, see docs for examples.
You need to use the libname-statment for each library you want to use. Then use something like
data pcy2017.pcy_201707;
set pl.pola_201707;
run;
if the dataset is small. For larger datasets using proc datasets with copy + change is recommended, see docs for examples.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.