Hi ,
We use the below code to submit jobs ,and we pass the macro variables across through a loop for each task.
Kindly let me know the reason for code being submitted only once (one systask) in random manner.
systask command "START ""Batch"" /wait /min
""%sysget(sasroot)\sas.exe"" -batch -nosplash
-sysin ""&run_file."" -log ""&log_file."" -print ""&lst_file."" "
taskname=tsk_2;
Note: Loop passes the variable correctly.
Thanks,
Kayal.
Since you have hard code the TASKNAME and not used the WAIT option on the SYSTASK command then you could end up with two tasks running under the same name. I suspect that will cause confusion for your program.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.