Date: Thu, 18 May 2000 08:02:24 GMT
Reply-To: Richard Parfitt <RParfitt@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Richard Parfitt <RParfitt@HOTMAIL.COM>
Organization: Deja.com - Before you buy.
Subject: Re: SAS/CONNECT Macro Variable Problem
Thanks for that, I had not originally thought of RSUBMIT blocks in
quite those terms, but doing so certainly helps me! I believe the only
solution I can use in my circumstances is to have a macro within the
RSUBMIT block as well, which forces the resolution in the correct
place, since the remote machine compiles that macro. This is fiddly,
but at least is works.
BTW, %sysrput also works in 6.12, and the SI macro %syslput does the
reverse quite efficiently (although I wasn't impressed by the use of
Thanks also to Charles, Nancy and everyone else for your help with
this. SI help haven't found a solution yet, so you all beat them to it!
In article <email@example.com>,
John M. Wildenthal <firstname.lastname@example.org> wrote:
> In article <email@example.com>,
> Richard Parfitt <RParfitt@hotmail.com> wrote:
> > Hi, can anyone help me with a problem highlighted in the code below?
> > %macro test;
> > rsubmit;
> > %global word word2;
> > %let word=boo;
> > %let word2=;
> > data _null_;
> > word = symget('word');
> > call symput('word2','boo too');
> > run;
> > %put WORD: &word;
> > %put WORD2: &word2;
> > endrsubmit;
> > %mend test;
> > %test;
> > The log indicates (see below) that the 2 %put functions are firing
> > before the data step, so WORD2 resolves as blank. If run outside of
> > macro, however, WORD2 resolves correctly. Also, if run in a macro
> > without the RSUBMIT, WORD2 resolves correctly. Therefore, can I
> > the resolution of a macro variable to be runtime?
> > NOTE: Remote submit to SERVER1 commencing.
> > WORD: boo
> > WORD2:
> > 2232 data _null_;
> > 2233 word = symget('word');
> > 2235 call symput('word2','boo too');
> > 2236 run;
> > NOTE: DATA statement used:
> > real time 0.010 seconds
> > cpu time 0.012 seconds
> > NOTE: Remote submit to SERVER1 complete.
> You should think of an RSUBMIT block as being a group of statements
> that are compiled before sending, something like being within a step
> boundary. SAS evaluates all of the macros within the RSUBMIT block
> before actually sending them over.
> Values existing in the Remote session can be transferred to the Local
> session by using %SYSRPUT. I know it is available in v7 and v8, but
> don't know about earlier versions. If you need to send macro values
> the remote session, one method is to write a DATA _NULL_ that outputs
> a .sas file that will be included by the remote session.
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.