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 .
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.