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:         Wed, 9 Jun 2010 14:27:18 -0700
Reply-To:     Paul Dorfman <sashole@BELLSOUTH.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Dorfman <sashole@BELLSOUTH.NET>
Subject:      Re: How do I get specific abend or return code from SAS under UNIX
Comments: To: Scott Bennett <scott.bennett@HEWITT.COM>
In-Reply-To:  <201006091729.o59Anxih016963@willow.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1

Scott,

At the very least, you could write the value to a 1-record file which the script will read after SAS is kaput.

filename kaput '<path>' ; data _null_ ; file kaput ; put '1' ; abort abend 1 ; run ;

Then let the script read file '<path'> and do whatever with the value.

Kind regards ------------ Paul Dorfman Jax, FL ------------

--- On Wed, 6/9/10, Scott Bennett <scott.bennett@HEWITT.COM> wrote:

> From: Scott Bennett <scott.bennett@HEWITT.COM> > Subject: How do I get specific abend or return code from SAS under UNIX > To: SAS-L@LISTSERV.UGA.EDU > Date: Wednesday, June 9, 2010, 1:29 PM > 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