05-18-2016 10:50 AM
I am using Shell Scripts to invoke SASGSUB command. I recently noticed that irrespective of whether the job is successful or not, the return code in Shell Script is 0(Success)
Extract from my shell script is below:
sasgsub -gridsubmitpgm $PGMDIR/$PGM -gridwait -gridwork $LOGLOC -gridsasopts "(-autoexec $AUTOEXE -config $CONFIG)"
How can i capture SASRC onto rval in the above shell script?
05-19-2016 02:30 AM
Could you try running like this:
sasgsub -gridsubmitpgm $PGMDIR/$PGM -gridwork $LOGLOC -gridsasopts "(-autoexec $AUTOEXE -config $CONFIG)" -gridwaitresults -gridwatchout
05-19-2016 10:53 AM
05-25-2016 05:55 AM
Please check this link:
In it says that
To be able to use the grid with other workload automation before SAS 9.4, SAS recommended that you use
SASGSUB in a script to do the following:
1. Run SASGSUB to submit a SAS program to the grid.
2. Run SASGSUB to determine the status of the grid job. Repeat this step until the grid job has completed.
3. Run SASGSUB to retrieve the results of the grid job.
4. Parse the results to determine whether the grid job succeeded or failed.
SAS even provides shell scripts to do this “submit/wait/get results” looping, but they are less than ideal. Starting in the
second maintenance release of SAS 9.3, SASGSUB had a GRIDWAIT option to merge step #1 and step #2, but you
still had to at least perform step #1 along with steps #3 and #4.
Check your sas release and may be try out some of this.