Date: Wed, 22 Nov 2006 21:36:43 -0800
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: make and exit status codes
Content-Type: text/plain; format=flowed
>I use SAS with the unix make utility. For each project I have a
>makefile that describes the relationship between my data preparation,
>analysis and extract programs. It's very effective.
>If you are familiar with make, it's obvious that I'm running all
>these SAS programs in batch mode. One nice feature of make is that it
>stops processing whenever an executed program has a non-zero exit
>status. In batch mode, SAS has an exit status of zero when the program
>finishes successfully and 2 when the program has an error. But it has
>an exit status of 1 when the program has a warning and that's the
>crux of my problem. Often I'm happy to ignore the SAS warnings and
>would like make to continue processing. However, I always want make to
>stop processing whenever there is an error.
>I've thought of several work-arounds but I can't figure out how to
>implement any of them.
>1. Use a SAS option to suppress warnings. If this option exists, I
>can't find it.
>2. Use a SAS option to change the exit status for warnings from 1 to
>zero. If this option exists, I can't find it.
>3. Get make to ignore an exit status of 1 but stop on an exit status
>4. Instead of executing SAS directly, have make execute a shell script
>that somehow resets the SAS exit status to zero or 2.
>Any help on implementing any of these ideas or any new ideas is greatly
Let me suggest a stupid alternative. Have you considered
fixing the SAS code so that you do not get WARNING messages
occurring? They usually mean that there is a problem, or at least
that there *may* be a problem. I would feel better about fixing
the code than finding a way to ignore the warnings.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Get FREE company branded e-mail accounts and business Web site from
Microsoft Office Live