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 (July 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 13 Jul 2010 06:55:25 -0400
Reply-To:     Jesper Sahner Pedersen <jespersahner@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jesper Sahner Pedersen <jespersahner@HOTMAIL.COM>
Subject:      Re: Masking macros in rsubmit-block
Comments: To: Mark Keintz <mkeintz@WHARTON.UPENN.EDU>
Content-Type: text/plain; charset=ISO-8859-1

Hi Mark,

Thanks for the reference.

In the conclusion is stated: "In many cases just moving the RSUBMIT/ENDRSUBMIT outside the macro causes everything to work as desired. By doing this you are causing the macro itself to be complied on the remote host leaving no room for error as to what should and shouldn’t get remote submitted."

In my example this doesn't hold true (maybe because of macro-nesting), I guess.

Regards, Jesper

On Tue, 13 Jul 2010 04:51:37 +0000, Keintz, H. Mark <mkeintz@WHARTON.UPENN.EDU> wrote:

>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


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