Hi everyone,
After running code, I have a library WORK with 64 outputs like the picture below:
And normally I export to physical file for one file is as below:
libname myfolder 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\2Cfiltering';
proc copy in=work out=myfolder;
select argentina_merge2;
run;
quit;
Could you please help me to generate code to export all files from library work to physical files as above? I appreciate any other alternative way in doing so as well.
I want to "export" because I do not want to write a so-called "long" code because it is really a mess for me to debug afterward.
Warm regards.
P/S: I also added the output of content of library "WORK"
And when running PROC CONTENTS, I saw some strange memname that I do not know where they come from, so be careful about them
> Could you please help me to generate code to export all files from library work to physical files as above?
The work files are physical files, so this question is oddly worded.
Look at the proc copy statements, especially exclude and select.
Or maybe copy all, and delete the unneeded ones, like _PRODSAVAIL.
> Could you please help me to generate code to export all files from library work to physical files as above?
The work files are physical files, so this question is oddly worded.
Look at the proc copy statements, especially exclude and select.
Or maybe copy all, and delete the unneeded ones, like _PRODSAVAIL.
Hi @ChrisNZ
I mean, how to macronize or generalize the code
libname myfolder 'C:\Users\pnguyen\OneDrive - Massey University\PhD JOURNEY\2Cfiltering';
proc copy in=work out=myfolder;
select argentina_merge2;
run;
quit;
For all files in the library work (the code above just for only one output file in the library work)
Warm regards.
R e a d t h e d o c u m e n t a t i o n.
In this case, remove the select statement.
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.