Hello
I have the following question
Usually, when I want to do several threads at the same time and then after doing them, start a thread that uses the results of previous threads, I use the following solution
systask command "START ""Batch"" /wait /min
""C:\Program Files\SAS\SASFoundation\9.2(32-bit)\sas.exe"" -batch -nosplash
-sysin ""&CodePatch.__TrRt_&NrFL._&Period._1_1_.sas"" -log ""&CodePatch"""
taskname=job2_for_data;
systask command "START ""Batch"" /wait /min
""C:\Program Files\SAS\SASFoundation\9.2(32-bit)\sas.exe"" -batch -nosplash
-sysin ""&CodePatch.__TrRt_&NrFL._&Period._1_2_.sas"" -log ""&CodePatch"""
taskname=job3_for_data;
waitfor _all_ job2_for_data job3_for_data;
systask command "START /realtime ""Batch""
""C:\Program Files\SAS\SASFoundation\9.2(32-bit)\sas.exe"" -batch -nosplash
-sysin ""&CodePatch.__TrRt_&NrFL._&Period._1_0_DL.sas"" -log ""&CodePatch""";
Currently, threads run another application at different intervals and after completing them I would like to automatically analyze the results and make a report. Has the community developed any solutions for this occasion?
Maybe did you not get a response because other people, like me, do not quite understand what you are after?
In what way is what you are doing now not sufficient?
The first situation well known even to beginners in parallel programming.
All tasks (task_1 to task_7) start at the same time and after the last one (task_8), eg reporting starts.
Here I know the solution to the problem.
Second situation:
Tasks (task_1 to task_7) start at different times, independently and after the last one (task_8) the reporting begins
Here I do not know the solution to the problem
Well you need to set a trigger somewhere.
You could check for the existence of a sas data set or an environment variable, but usually an empty text file is created in a trigger directory.
This allows cross-system checks, and is easy to monitor.
if fileexist() is what your last process tests.
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 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.
Ready to level-up your skills? Choose your own adventure.