05-13-2014 01:52 PM
could someone help me on how to change the status code in unix. Warning messages gives status code = 1. which is causing my control-m jobs to throw error. i would like to change the status code = 0 when there is warning messages (status code=1).
05-13-2014 02:39 PM
Are you using a SAS configuration (Lev1/SASApp etc)?
If so, edit the wrapper script in the BatchServer directory. Usually it has some commented code which you easily could edit for this purpose.
If not, you can create a wrapper script on your own, where check for the SAS return code, and alter if necessary.
But, why do you have warnings? Perhaps it's better to create "better" programs that does not throw warnings
05-13-2014 03:06 PM
The SYSCC macro variable is what you want to use. If this is not resolving you issue, your will need to provide some more context to your problem, such as some code/log from the process and what you are using outside of SAS to capture the status. You should set the SYSCC variable to 0 as the very last step in your code for it to have the appropriate effect. You should also probably only set it to overwrite if a warning condition is actively set (SYSCC=4).
EDIT: I see that you said you are using the control-m scheduler to submit the jobs, I assume this is the tool reporting the SAS termination status to you.
05-13-2014 03:39 PM
Why not use ctrl-m options. Set the acceptance level for the jobs that are allowed to have warnings that way. Quite common with schedulers. In my old time c=0 allok c=4 is a warning c=8 an error and c=12 abend. All be adjusted like that in the flow of the scheduler.
05-13-2014 03:47 PM
Thank you for the information. I didn't know we could do that. I spoke with control-m team. but couldn't solve this issue. I will try this option.