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 (June 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 10 Jun 2010 16:07:34 +1200
Reply-To:   Tom Robinson <barefootguru@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tom Robinson <barefootguru@GMAIL.COM>
Subject:   Re: How do I get specific abend or return code from SAS under UNIX
In-Reply-To:   <201006091729.o59Anxih016963@willow.cc.uga.edu>
Content-Type:   text/plain; charset=us-ascii

SAS should be passing the return code straight back to the script, and you can test in same way as the return code from any other command.

e.g. see <http://tldp.org/LDP/abs/html/exit-status.html> and <http://tldp.org/LDP/abs/html/filearchiv.html#FILECOMP> ('# Test exit status of "cmp" command.')

Cheers

On 2010-06-10, at 05:29, Scott Bennett wrote:

> When running SAS from UNIX command line, I need to capture the exact value > SAS has returned or abended with. > > If in SAS we have the following: > > DATA _NULL_; > ABORT ABEND 2000; > RUN; > > I need the UNIX script that started the SAS session to know SAS abended > with the 2000 code. > > Also if SAS had the following: > > DATA _NULL_; > ABORT RETURN 1; > RUN; > > I need to know the SAS returned a 1 because of the code, and not because of > a SAS warning. > > The reason for this is I need to have SAS previously running on MVS produce > the same results on UNIX. On MVS a SAS warning would result in a job step > RC of 4, so a value of 1 from the developer is meaningful. > > Thanks!!


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