BookmarkSubscribeRSS Feed
Kayalvizhi
Fluorite | Level 6

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.

1 REPLY 1
Tom
Super User Tom
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 282 views
  • 0 likes
  • 2 in conversation