Difference between return value of SAS and SASGSUB command in Shell Script

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Difference between return value of SAS and SASGSUB command in Shell Script

Hi Team,

 

My current work needs SAS to be invoked from Autosys. For this, i am using Shell scripts to invoke SAS Program. So autosys invokes shell scripts. Shell script in turn invokes SAS program. This is something that has worked for me. Recently however i had a migration from SAS 9.2 to GRID.

 

So to invoke SAS programs from Shell Script, i started using SASGSUB instead of SAS. What i have observed is that the moment SASGSUB -gridsubmitpgm <SAS program name> is executed, shell return value of 0. But if i were to use 

sas <SAS program name>, then the return code is generated only based on success of SAS program. I know manually i can verify in the folder SASGSUB_<Datatimestamp>_<Program_name>

 

Is there a way i can get the SAS return code in shell script? 

 

 


Accepted Solutions
Solution
‎05-16-2016 09:39 AM
Super User
Posts: 3,233

Re: Difference between return value of SAS and SASGSUB command in Shell Script

Perhaps the option GRIDWAITRESULTS is what you need as discussed here:

 

http://support.sas.com/resources/papers/proceedings13/470-2013.pdf

View solution in original post


All Replies
Solution
‎05-16-2016 09:39 AM
Super User
Posts: 3,233

Re: Difference between return value of SAS and SASGSUB command in Shell Script

Perhaps the option GRIDWAITRESULTS is what you need as discussed here:

 

http://support.sas.com/resources/papers/proceedings13/470-2013.pdf

Occasional Contributor
Posts: 13

Re: Difference between return value of SAS and SASGSUB command in Shell Script

I went through the material. Option GRIDWAIT worked for me.
Occasional Contributor
Posts: 13

Re: Difference between return value of SAS and SASGSUB command in Shell Script

 Hi SAS Kiwi,

 

By any chance, you have come across the below problem as well?

 

https://communities.sas.com/t5/General-SAS-Programming/Capturing-return-value-from-SASGSUB-command/m...

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 392 views
  • 0 likes
  • 2 in conversation