DATA Step, Macro, Functions and more

Parallelization with SYSTASK - SAS Connect not installed

Reply
Occasional Contributor
Posts: 15

Parallelization with SYSTASK - SAS Connect not installed

Hi all,

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;

Error:

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

Contributor
Posts: 26

Re: Parallelization with SYSTASK - SAS Connect not installed

Hi,

Is it not necessary in SYSTASK to mention the complete command as below

 

systask command

                 "START ""Batch"" /wait /min
                    ""%sysget(sasroot)sas.exe"" -batch -nosplash
                    -sysin ""DSmiley Tonguerogram1.sas""
                    -log ""DSmiley Tonguerogram1.log""

                " wait;

 

 

 

Rgds,

AbhiD

Respected Advisor
Posts: 3,887

Re: Parallelization with SYSTASK - SAS Connect not installed

[ Edited ]

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;

 

Log directives:

https://support.sas.com/documentation/cdl/en/lesysoptsref/68023/HTML/default/viewer.htm#p0fmptfnyvi1...

 

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...

 

Ask a Question
Discussion stats
  • 2 replies
  • 532 views
  • 0 likes
  • 3 in conversation