Date: Tue, 13 Jul 2010 04:51:37 +0000
Reply-To: "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
Subject: Re: Masking macros in rsubmit-block
In-Reply-To: <201007111854.o6BAkmAY007547@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Jesper
If you did not embed your work in a single macro TEST, you get consistent results for CLIENT and SERVER. This made me think the problem is partially related to nested macro definitions.
A google search for "nested macro definitions" sas
yielded http://support.sas.com/techsup/technote/ts697.pdf (titled "The Relationship between SAS/CONNECT and the MACRO facility").
Regards,
Mark
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> Jesper Sahner Pedersen
> Sent: Sunday, July 11, 2010 2:55 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Masking macros in rsubmit-block
>
> Hi,
>
> According to the "SAS/Connect 9.2 Users Guide, p. 126, example 3" a
> macro
> definition embedded in a rsubmit-block is remotely submitted and none
> of the
> macro statements are interpreted in the client session.
>
> In the code below the client- and server-macro definitions are
> identical but
> they are interpreted differently:
>
> %macro test;
>
> %macro client;
> %let a=%str( );
> %put x&a.x;
> %mend client;
> %client;
>
> %let server=xx.xx.xx.xx xxxx;
> signon server user=xxxxxx password='xxxxxxxx';
> rsubmit;
> %macro server;
> %let a=%str( );
> %put x&a.x;
> %mend server;
> %server;
> endrsubmit;
> signoff;
>
> %mend test;
>
> %test;
>
> - produces the following output:
> x x
> xx
>
> - and options=mprint shows the following macro-code in the rsubmit-
> block:
> %macro server;
> %let a= ;
> %put x&a.x;
> %mend server;
> %server;
>
> In other words the %str()-statement is not masked, hence the macros are
> interpreted differently.
>
> Is this an error, or am I missing something?
> And if not an error, how can a macro be completely masked?
>
> Regards,
> Jesper
|