Date: Wed, 7 Jun 2000 13:41:03 -0400
Reply-To: Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject: Re: PUTting _all_
Content-Type: text/plain; charset="iso-8859-1"
Bill,
It is a question of what havppen at compile time versus what happens at
execution time.
In
PUT (_ALL_ ) (";") ;
_ALL_ is a list of variables generated from the PDV when this line is
compiled and _error_ and _n_ have not yet been added to the PDV.
In
PUT _ALL_ ;
_ALL_ is a keyword saying write out the PDV as it is at execution time.
To verify this try
data _null_ ;
put (_all_) (=) ;
put _all_ ;
x = 1 ;
put (_all_) (=) ;
put _all_ ;
y = 2 ;
put (_all_) (=) ;
put _all_ ;
run ;
Ian Whitlock
-----Original Message-----
From: Bill Leblanc [mailto:BLeblanc@GWMAIL.VALENCIA.CC.FL.US]
Sent: Wednesday, June 07, 2000 12:16 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: PUTting _all_
I'm a little puzzled why (_all_) suppresses the automatic variables while
_all_ does not. See log:
2149 data _null_;
2150 x=1;y=2;z=3;
2151 put (_all_) (';') @;
2152 put @1 ' ';
2153 run;
1 ;2 ;3
NOTE: DATA statement used:
real time 0.04 seconds
2154 data _null_;
2155 x=1;y=2;z=3;
2156 put _all_ @;
2157 put @1 ' ';
2158 run;
=1 y=2 z=3 _ERROR_=0 _N_=1
NOTE: DATA statement used:
real time 0.00 seconds
-Bill LeBlanc