Date: Tue, 20 May 2008 10:40:16 -0400
Reply-To: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject: Re: SAS macro
Content-Type: text/plain; charset=us-ascii
> From: Aj
> Hi All
> I have a set of macros( with 6 separate codes) , and a master file
> which passes the initial set of values to the macros .
> Is there a short cut to find out which macros is called when and what
> values are passed for the macros without manually tracking each of
> the passes .
> Please advice.
Ah, no, there may be no short-cut
the long way is to have a discipline that has either your master file
or your macros self-reporting.
I have presented a paper
Writing Testing-Aware Programs
that shows some methods for both data step and macro
** data step:;
attrib Testing length = 4;
*whichever option you want to use that turns on the self-reporting;
*note: source2 controls echo of %included programs;
retain Testing %eval(0 or %sysfunc(getoption(Source2)) eq SOURCE2);
if Testing then putlog Stmnt=;
,Testing = 0
%Let Testing = %eval(&Testing
eq MPRINT );
%If &Testing. %then %put _local_;
Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov