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 (November 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 14 Nov 1996 10:43:03 -0800
Reply-To:     gxx18300@ggr.co.uk
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Bruce Rogers <gxx18300@GGR.CO.UK>
Organization: Medical IR, Glaxo Wellcome
Subject:      Re: Empty seq file in MVS
Comments: To: "Roger Fahy GBSLAC ISI Dev Sup(51824)" <gbsl1rpf@IBMMAIL.COM>

Roger Fahy GBSLAC ISI Dev Sup(51824) wrote: > > I'm sure I've seen this before but I can't find it in my backlog and time is > running out....so > > My customer is reading a flat sequential file (this is MVS by > the way) to read in info to use later in the program. Normally this flat file > has data in it, today it has nothing and his job failed. > > Is there an easy way in SAS to determine that this file is empty? > > If not directly in SAS any other ways?

Assuming you're reading it in SAS with a data step, you can use the end= flag to check for end-of-file BEFORE the first input statement. e.g.

DATA .. ; infile ... END=EOF; if _n_ = 1 & eof then do ; put 'Empty file encountered !!!!' ; stop; end; input .... ;

HTH

Bruce


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