Hello,
I am running this data (called drases) and wanted the resulting SAS data to be created (tcalled all_drases), to be stored in one of my Library folders (called jdata) instead of that file automatically going into Work folder.
Please what is the appropriate SAS programming for this?
Below is the SAS program i am running;
libname samma "F:\samma";
data drases;
set samma.drases;
data all_drases;
set drases;
if crodcode in (678, 790, 890, 898, 920, 930, 940) then alc_grp="AMAS";
if crodcode in (67, 87, 93, 97, 98, 99, 1028, 8282, 82829, 63789) then alc_grp="AMAL";
run;
Just use the library for output as you used it for input:
data jdata.all_drases; /* line changed */
set drases;
if crodcode in (678, 790, 890, 898, 920, 930, 940) then alc_grp="AMAS";
if crodcode in (67, 87, 93, 97, 98, 99, 1028, 8282, 82829, 63789) then alc_grp="AMAL";
run;
Just use the library for output as you used it for input:
data jdata.all_drases; /* line changed */
set drases;
if crodcode in (678, 790, 890, 898, 920, 930, 940) then alc_grp="AMAS";
if crodcode in (67, 87, 93, 97, 98, 99, 1028, 8282, 82829, 63789) then alc_grp="AMAL";
run;
worked out perfectly.
Thanks!
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.