LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 11 Feb 2005 14:02:50 -0800
Reply-To:   cassell.david@EPAMAIL.EPA.GOV
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
In-Reply-To:   <33705.160.81.221.42.1108155774.squirrel@mail.webquarry.com>
Content-type:   text/plain; charset=US-ASCII

nabakah@BRAATPAQ.COM wrote: > I'm running a bunch of SAS jobs on Linux and I take certain actions based > 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 > successfully?

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.

HTH, David -- David Cassell, CSC Cassell.David@epa.gov Senior computing specialist mathematical statistician


Back to: Top of message | Previous page | Main SAS-L page