First, run "options mprint symbolgen;" to get the command string that resolve the macro variable and check if it executes correctly as a command.
Note that the command presented will not be moved or renamed since the first and second parameters are the same file path.
Source and target of the move command are identical, so this will in effect do nothing.
Anyway, don't use the X statement if you want to know what an external command does, use a PIPE:
data _null_;
infile pipe "mv source target 2>&1";
input;
put _infile_;
run;
The 2>&1 reroutes stderr to stdout, so the data step can read all messages originating from the external comnand and write them to the SAS log.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.