05-16-2013 07:58 PM
I am trying to trigger multiple SAS Sessions in parallel using SYSTASK. I used rsubmit before but there is no SAS Connect in our current set up. Can any one please help me with this:
Below i am trying to run two sas scripts (adh.sas & adh1.sas) in parallel using a different sas script (adh2.sas)
Content in script adh2.sas
systask command "sas /sas/exl/exl_final_reports_dev/adh.sas" taskname = rmnohup;
systask command "sas /sas/exl/exl_final_reports_dev/adh1.sas" taskname = rmgmi;
NOTE: SAS initialization used:
real time 0.14 seconds
cpu time 0.11 seconds
ERROR: Execution of the Command 'sas /sas/one/one_time/adh.sas' failed.
ERROR: The specified executable module either cannot be located or it is not a valid executable.
ERROR: Could not create a new process.
1 systask command "sas /sas/one/one_time/adh.sas" taskname = rmnohup
11-23-2015 11:05 PM
Is it not necessary in SYSTASK to mention the complete command as below
"START ""Batch"" /wait /min
""%sysget(sasroot)sas.exe"" -batch -nosplash
11-24-2015 04:05 AM - edited 11-24-2015 04:25 AM
Very often you want a specific environment invocated. If so then don't use "sas.exe" but "sas.bat" (Windows) or "sas.sh" (Unix/Linux) under the server context you want.
The following code works for me when executed via SAS EG with a SAS Server under Windows. The child processes use the "sas.bat" under the server context (compute tier) to which the EG session is connected to.
systask command " %sysget(APPSERVER_ROOT)\sas.bat -batch -nosplash -sysin ""c:\test\HelloWorld.sas"" -log ""c:\test\#P_#Y#m#d_#H#M#s_#p.log"" -logparm rollover=session " taskname=pgm1 nowait; systask command " %sysget(APPSERVER_ROOT)\sas.bat -batch -nosplash -sysin ""c:\test\HelloWorld.sas"" -log ""c:\test\#P_#Y#m#d_#H#M#s_#p.log"" -logparm rollover=session " taskname=pgm2 nowait; waitfor _all_ pgm1 pgm2;
SAS/Connect ("rsubmit") gives you remote library services. This is something you don't have available when creating child sessions via SYSTASK. You will need to write data to permanent tables in the child sessions and then access these tables later on in the parent session.
You can "mimik" the SAS/Connect functionality of pushing macro variables from the parent to the child via system option "-initstmt" (dynamically creating "%let" statements which then get executed in the child session).
Here the link for Windows but the same works also under UNIX/Linux: http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#p05ueoh4gef14pn10r...