DATA Step, Macro, Functions and more

Batch Processing with SAS

Reply
N/A
Posts: 0

Batch Processing with SAS

I am trying to run a batch file through the SAS session after it has run a SAS program. Using x command, this could be run. But what particular x command will run the bat say if I am having the batch file on a network drive “p:\sas\mybatch.bat”. I tried
X call “p:\sas\mybatch.bat”; or call system(‘cd p:\sas\mybatch.bat’), but no luck. I guess I am missing something. Could you please help me to identify my mistake.

data _null_;
command ='cd' ||'c:sas\copy_datasets.bat';
call system (command);
run;
Trusted Advisor
Posts: 2,113

Re: Batch Processing with SAS

You first need to read the documentation more carefully. The format for the X command does not include the "call". It would be just

x 'p:\sas\mybatch.bat';

Also, the MS-DOS "CD" command takes as it's argument a directory rather than a file name.
N/A
Posts: 0

Re: Batch Processing with SAS

Thanks. That worked!!
Ask a Question
Discussion stats
  • 2 replies
  • 133 views
  • 0 likes
  • 2 in conversation