Date: Wed, 9 Jun 2004 10:34:05 -0500
Reply-To: greg.woolridge@TAP.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Greg Woolridge <greg.woolridge@TAP.COM>
Subject: Re: NOBS
Content-type: text/plain; charset=iso-8859-1
I wonder if the problem isn't with this data step, but with some previous
step. The "NOTE: SCL source line." that appears in the log right after the
data _null_ statement leads me to believe that something else funny is
going on.
Greg M. Woolridge
Manager, Study Programming
TAP Pharmaceutical Products Inc.
e-mail: greg.woolridge@tap.com
phone: 847-582-2332
fax: 847-582-2403
Harry Droogendyk
<harry.droogendyk To: SAS-L@LISTSERV.UGA.EDU
@RBC.COM> cc:
Sent by: "SAS(r) Subject: Re: NOBS
Discussion"
<SAS-L@LISTSERV.U
GA.EDU>
06/09/2004 10:14
AM
Please respond to
harry.droogendyk
Actually, the order of the statements is not Paul's problem. I'm running
8.2 on W2K and the code works fine. In fact, it even works if the set is
never executed at all, and that because nobs is set at compile time.
110
111 data _null_;
112 put nobs=;
113 stop;
114 if 0 then set a nobs=nobs;
115 run;
nobs=1
Now, do I have a solution for Paul? Nope. :-)
-----Original Message-----
From: Terjeson, Mark [mailto:TERJEM@DSHS.WA.GOV]
Sent: Wednesday, June 09, 2004 10:36 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: NOBS
Hi Paul,
Mostly we think most coding elements getting
processed at runtime. If I recall, the NOBS
is one of a half dozen things that get set at
compile time before executing through the
runtime, and compile time parsing is top down
mostly so the asking for nobs hasn't happened
yet, thus moving the SET statement in front
of the CALL SYMPUT will get things going again.
data unit_campus;
a=1;output;
a=2;output;
a=3;output;
a=4;output;
run;
data _null_;
set unit_campus nobs=nobs;
call symput('nobs',nobs);
stop;
run;
%put &nobs;
Hope this is helpful,
Mark Terjeson
Reporting, Analysis, and Procurement Section
Information Services Division
Department of Social and Health Services
State of Washington
mailto:terjem@dshs.wa.gov
-----Original Message-----
From: Paul CARRENO [mailto:p.carreno@ECU.EDU.AU]
Sent: Tuesday, June 08, 2004 7:17 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: NOBS
I am running 8.2 and I get the error message below.
I am confused because I have run that routine in SAS 8.0
some months ago and it worked. Anything new in 8.2 that may be affecting
this?
Any pointers will be helpful
--------------------------------
1491
1492 data _null_;
NOTE: SCL source line.
1493 call symput('nobs',nobs);
----
546
NOTE 546-185: The variable nobs may be uninitialized.
1494 stop;
1495 set unit_campus nobs=nobs;
1496 run;
------------------------------------------------------------
This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne
renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce message ou des renseignements qu'il contient par
une personne autre que le (les) destinataire(s) désigné(s) est interdite.
Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser
immédiatement, par retour de courrier électronique ou par un autre moyen.
============================================================