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 (May 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 May 2003 11:38:13 -0400
Reply-To:     "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Subject:      Re: Statement placement
Comments: To: Charles Patridge <Charles_S_Patridge@PRODIGY.NET>,
          David Kellerman <kellermandavid@YAHOO.COM>
Content-Type: text/plain; charset="iso-8859-1"

Charles' observation is correct. However, I think David Kellerman has omitted the STOP statement that should come immediately after the do loop ends and prior to the SET statement. What is the point of reading the whole dataset to find out whether the data set is empty?

If the STOP is incorporated then the placement of the SET statement matters.

__________________________ Venky Chakravarthy E-mail: swovcc@hotmail.com

-----Original Message----- From: Charles Patridge [mailto:Charles_S_Patridge@PRODIGY.NET] Sent: Wednesday, May 21, 2003 11:09 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Statement placement

Dear David,

It works for me! Not sure what you tested or how but you can/should be able to have the SET statement before the IF .

see my log -

38 data a3; delete; run;

NOTE: The data set WORK.A3 has 0 observations and 0 variables. NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

39 40 DATA _NULL_; 41 SET A3 NOBS=HOWMANY; 42 IF HOWMANY = 0 THEN DO; 43 %put 'no records to process'; 'no records to process' 44 END; 45 RUN;

NOTE: There were 0 observations read from the data set WORK.A3. NOTE: DATA statement used: real time 0.03 seconds cpu time 0.01 seconds

Regards, Charles Patridge

LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.


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