[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: macro
From:       "Fehd, Ronald J. (PHPPO)" <rjf2 () CDC ! GOV>
Date:       2004-04-30 18:27:46
[Download RAW message or body]

> >Can anyone supply an example where the submacro
> must be defined within the main macro?

%macro abc(x);
%unquote(
%nrstr(%macro) &x(&x=1);
%nrstr(%put value of x is )&x which is %nrstr(&)&x;
%nrstr(%mend) &x;
)
%mend abc;

%abc(one)

%one

I put on my Missouri hat:
"Show me!"
and discovered not much until after a step boundary:

run;

after which I get the cryptic message:

value of x is one which is 1

I would have expected:
value of the macro abc parameter one is 1

what was that recent thread where we were discussing
whether one could communicate clearly in the
SAS macro unLanguage?

This is the knot in my statement at that time.

definitely something to hang on the wall
but knot readable and (so I conclude)
    knot reusable

Ron Fehd  the reusable macro maven  CDC Atlanta GA USA RJF2@cdc.gov

Bureaucracy
[-- or toy programs --]
at its worst is better than bureaucracy at its best
-- Plato, in Beetle Bailey comic strip, 1985Mar01

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic