One way to copy a dataset from let's say path1 to path2 is to use the libname and data statement as below
%let path1= something;
%let path2=something else;
%let fname=be_auto_prmjun2024;
libname source spde "&path1.";
libname dest spde "&path2";
data dest.&fname.;
set source.&fname;
run;
if we have many files, we coud use a filelist and a call execute and repeat the above script
What will be the unix command that we could use to copy spde file containing only the string prm (stand for premium) from many subfolders to other subfolders and of course only spde file.
Please provide the good unix command
Please p
Did you try PROC COPY?
I have many folders such as
sas2000
sas2001
...
sas2025
and in each sas????, I have other subfolder
What I would like to do is to copy only the premium dataset containg the string _prm
Is it possible to do that with proc copy
@alepage wrote:
I have many folders such as
sas2000sas2001
...
sas2025
and in each sas????, I have other subfolder
What I would like to do is to copy only the premium dataset containg the string _prm
Is it possible to do that with proc copy
If you only want to copy some of the datasets use the SELECT statement. Let SAS worry about what files are used by which dataset.
proc copy inlib=in outlib=out;
select premium ;
run;
You cannot copy/move SPDE data using OS tools.
This is because the directory path is coded into the table metadata.
See answers above for ways of copying within SAS:
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.