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 (August 2001, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 31 Aug 2001 11:55:38 -0700
Reply-To:   "Valone, Toren W." <TValone@DMV.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Valone, Toren W." <TValone@DMV.CA.GOV>
Subject:   Testing for empty file.
Content-Type:   text/plain; charset="iso-8859-1"

How do I test for an empty file?? Here is my code below, It seems that if the file is empty, then Sas does not populate the _n_ variable. I have also tried a put all with no results.

//STEP030 EXEC SAS,OPTIONS='NONEWS' //SASLOG DD SYSOUT=* //SASLIST DD SYSOUT=* //***************************************************************// //* WRITES OUT ESP SYMBOLICS FOR RECEIVE JOB *// //***************************************************************// //ESPIN DD DSN=&&ESP,DISP=(,PASS) //ESPOUT DD DSN=MV.PDG.EDI.ESP,DISP=OLD //SYSIN DD * OPTIONS NOCENTER DQUOTE ; DATA STEP1; INFILE ESPIN END = EOF; INPUT ; IF _N_ = '' THEN DO; PUT '_N_ IS BLANK'; END; IF _N_ = 1 THEN DO; PUT '_N_ IS =1 '; END;


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