X-Mailer: ELM [version 2.2 PL16]
Newsgroups: bit.listserv.sas-l
Date:         Wed, 7 Oct 1992 10:34:40 CDT
Reply-To:     "(R. Snyder)" <rsnyder@LOBBY.TI.COM>
From:         "(R. Snyder)" <rsnyder@LOBBY.TI.COM>
Subject:      Re: Error Handling in SAS
Comments: To: sparapan@SALT.RA.ANL.GOV
Comments: cc: sas-l@uga.cc.uga.edu, rnsyder@lobby.ti.com
              Oct 7, 92 9:48 am

SUBJECT:   OBS set to 0
SUMMARY:   No obvious solution
REL/PLTF:  6.07/HP300
E-ADDR:    rsnyder@lobby.ti.com
NAME:      Bob Snyder
COMPANY:   Texas Instruments, Sherman, TX
PHONE:     (903) 868-5799
FAX:       (903) 868-7240
>
> >> ----------------------------------------------------------------------
> >> content:  query
> >> SUMMARY:  how to avoid having obs set to 0 after a non-fatal error
> >> REL/PLTF: SAS 6.07, MVS/ESA, IBM309x clone
> >> E-ADDR:   pfeifer_g@cubldr.colorado.edu
> >> NAME:     Gary Pfeifer
> >> PH/ADDR:  303/492-6743   Univ of Colorado   CB 108   Boulder CO 80302
> >> ----------------------------------------------------------------------
> >>
> >> I have a batch job which uses the VTOC data for a disk volume to make
> >> a list of the SAS data libraries on that volume, and then uses that list
> >> to do a proc contents on each one, so that I can get a report on unused
> >> space in each library.  Under 6.06, if I ran the job while one of those
> >> libraries was in use, the job simply stopped processing that step, did not
> >> add any statistics for that library to the output dataset,
> >> and went on to the next library on the list.
> >>
> >> In 6.07 however, OBS is set to zero which means the rest
> >> of the list is not processed at all, and nothing is printed out for the
> >> libraries which were processed  correctly.
> >>
> >> It seems like there is an option which controls whether obs is set to zero
> >> in such cases, but I cannot find it.
> >>
> >> If there is no such option, does it make any sense to try setting obs back
> >> to MAX, if I get a nonzero return code from the PROC Contents?
> >>
> >> Gary
> >>
> >
> >To One and All,
> >
> >I've experienced simular problems and am interrested in any replys.
> >
> >Thanks,
> >Bob
> >
> Gary and Bob and Sas-l:
>
> I have been using a technique lately that may be of interest to this problem.
> Sas has two error handling modes:  interactive and batch.  They are(in my
 view)
> counterintuitive.  In interactive error handling, the datastep which generates
> the error is set to obs=0 and the rest of the program is processed as usual.
> This is counterintuitive in the sense that if it is an interactive session, it
> could prompt the user for the error handling option to be specified.  In batch
> mode, it operates like an abort and the rest of the program is checked for
> syntax errors and not processed.  I think that it should be the other way
> around.  In a batch job, the program should attempt completion especially
> since there may be no user logged on to inform.  Therefore, any programs in
> which I know there is the possibility of error generation, but I want to
> process entirely, I run interactive(bummer).  There is an option called
> errorabend that abends after an error, but this is of little use.  I hope
> there is an error handling option on the sasware ballot.  By the way, I use
> v5 manuals for the most part so I don't have to share, but I think I got this
> stuff from v6, but please correct me if I'm wrong.
>
Gary,

I appreciate the insight you've given into the problem. Kernon Gibes also
added some useful information on the NODSNFERR option. I guess the long
and the short of it is that there is no handy dandy SAS Option to cure
the "problem". Perhaps we should submit it to SI Tech Support for the
SASWare Ballot.

Thanks and regards,

Bob