|Date: ||Fri, 11 Feb 2005 14:02:50 -0800|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>|
|Subject: ||Re: Using return codes with Shell script|
|Content-type: ||text/plain; charset=US-ASCII|
> I'm running a bunch of SAS jobs on Linux and I take certain actions
> on the return code of the SAS job, variable $? = 0.
> Some of the jobs complete successfully with $? > 0 (there were some
> warnings in the log).
> What is the highest acceptable value of $? for a job that completed
You can't go sequentially. $? = 1 tells you there were warnings in
the log, but that might mean the job did NOT really complete properly.
(Frankly, unles you check the log for crucial notes, you may still miss
job which finished but failed to do as they were supposed to do, and
uncooperatively returned $? = 0.) So if you get as high as 1, you
have a potential problem.
You're better off checking internally and using the statement
ABORT <ABEND> n;
to give you really informative error codes (because you built the
number system yourself, so you will know what it means if $? returns
with a 42.
David Cassell, CSC
Senior computing specialist