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 (January 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 4 Jan 2000 13:07:39 GMT
Reply-To:   shiling@MATH.WAYNE.EDU
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   shiling@MATH.WAYNE.EDU
Organization:   Deja.com - Before you buy.
Subject:   Re: symget('sg&i'), can I do that?

In article <08f6992b.c11fc62a@usw-ex0107-043.remarq.com>, Walter Smith <wjsmith1NOwjSPAM@fedex.com.invalid> wrote:

<...delete...> > > But for me, its just a little plainer to skip the symget call and write: > data whatever; > %do i = 1 %to 100; > var&i = "sg&i"; > %end; > run;

symget("sg1") and var1=&sg1 could be 'different'. The former requires the macro variable available in 'excuting time', the latter needs the macro variable available at 'compiling time'.

Just my $0.02.

NOTE: AUTOEXEC processing completed.

1 data _null_; 2 var1=symget("sg1"); 3 run cancel;

NOTE: Data step not executed at user's request. NOTE: DATA statement used: real time 0.06 seconds cpu time 0.00 seconds

4 5 data _null_; 6 var1=&sg1; - 386 WARNING: Apparent symbolic reference SG1 not resolved. 7 run cancel;

ERROR 386-185: Expecting an arithmetic expression.

NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used: real time 0.74 seconds cpu time 0.01 seconds

Sent via Deja.com http://www.deja.com/ Before you buy.


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