I am submitting the following code expecting to see SAS attempt one X command a time and not wait for a submission of 'exit' into Command Prompt to close:
options noxwait xsync;
data _null_;
x 'cd C:\Python33';
x 'start test.py';
run;
data _null_;
call system ('exit');
run;
data _null_;
x 'cd C:\Python33';
x 'start test.py';
run;
data _null_;
call system ('exit');
run;
data _null_;
x 'cd C:\Python33';
x 'start test.py';
run;
data _null_;
call system ('exit');
run;
data _null_;
x 'cd C:\Python33';
x 'start test.py';
run;
data _null_;
call system ('exit');
run;
data _null_;
x 'cd C:\Python33';
x 'start test.py';
run;
data _null_;
call system ('exit');
run;
Instead what is happening is that code initiates each instance of calling some Python code in sequence, but does not wait for the previous instance to finish. Is this the correct behaviour for the 'noxwait xsync' combination?
If so, I am attempting to use a work around of 'call system ('exit'). If you run the code in xwait mode you get two Command Prompt windows. One is the system administrator window and one is the one that invokes the code.
The one that invokes the code always closes itself down no matter whether noxwait or xwait is selected. If noxwait is selected all the windows eventually close themselves. In xwait mode the submission to command line of 'call system ('exit') does not close the administrator window.
Is there a way around this? I cannot just use noxwait and allow all the command prompt submissions to open and close in turn as the x commands are within nested macros and there ends up being thousands of Python calls all trying to execute at once.
Thanks