Hello
I have a question about the x or %sysexec command options .
Is possible to use these commands so as not appeared cmd window?
I use them in batch sessions very often, and they hinder my work.
Thank you for your help.
I would suggest replacing any X commands with data _null_ steps instead. For %SYSEXEC() you might need to check what else the program is doing as it might not be an appropriate place to introduce a step boundary.
Replace
x echo hello ;
With
data _null_;
infile "echo hello" pipe;
input;
put _infile_;
run;
%let log = -log "&CodePatch"; or %let log = -nolog;
%sysexec start /high sas.exe -icon -noterminal -nosplash -noxwait -noxsync -CONFIG
"C:\Program Files\SAS\SASFoundation\9.2\SASV9.CFG" -SYSIN "&CodePatch._GlobalControl_1.sas" &log;
Use the quote() function.
%let command=any valid command with any type of quoting ;
data _null_;
infile %sysfunc(quote(&command)) pipe;
input;
put _infile_;
run;
Is perhaps still some other option? because thus, locks the session SAS
Session which calls your command runs until the end of session induced.
I don't think we understand your question. Can you be more explicit please?
If you are trying to use this to run an asynchronous process then data _null_ step is NOT what you want.
To your original question you probably want to set the option NOXWAIT to prevent leaving the command window open. You might also look at NOXSYNC.
http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#exittemp.htm
Also did you try the SYSTASK command instead?
Tom,
I am looking at the %CMS command which is similar to the x command and I am having difficulties getting started. I am trying to pull data from AVAYA cms and don't know how to write the code nor can I find documentation. Do you have any idea how the code might look?
Thanks
I haven't used an IBM machine running VM/CMS since we migrated to OS/2.
Do you search for adding the -nodms option for the batch script so the dms system will not come SAS(R) 9.3 System Options: Reference, Second Edition
If you want to run batch job without the cmd window or DOS window poping up, add the following option on top of SAS code:
options noxwait;
The CMS is an oldy: Statements : CMS (v8 and esa/cms dedicated). A shell escape for interactive typing is not well accepted these days
You have to decide what you are needing.
a/ only a start of some program without any feedback on the results (asynchroon processin) tha using noxwait
b/ starting a program and needing the results/feedback than use the pipe approach.
c/ some system are support a proo setup for calling programs.
As you are trying to pull data form AVAYA CMS start at that side finding the technical description of that product retrieving data.
You can use "options noxwait;"
Put this in before you start %sysexec.
This will help you get rid of keying in "EXIT" in the command prompt every time.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.