I see no errors in the logs but the file just not copying into the second folder
Is this the right command?
x "copy /x/y/z/deals&FOLDERNAME..txt
/xx/yy/zz/deals&FOLDERNAME..txt" ;
I believe you should use 'cp' command
x "cp /x/y/z/deals&FOLDERNAME..txt /xx/yy/zz" ;
I believe you should use 'cp' command
x "cp /x/y/z/deals&FOLDERNAME..txt /xx/yy/zz" ;
Thank you 🙂
If you use the X statement, you should check the automatic macro variable &sysrc afterwards to see if the command succeeded.
To make the responses from the command visible in SAS, use the filename pipe method:
filename oscmd pipe "cp /x/y/z/deals&FOLDERNAME..txt /xx/yy/zz/deals&FOLDERNAME..txt 2>&1";
data responses;
length response $256;
infile oscmd;
input;
response = _infile_;
put _infile_;
run;
This will keep the responses both in the dataset and the SAS log.
The "2>&1" construct redirects error output into the pipe.
Or try FCOPY() function .
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.