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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Oct 2008 14:16:22 -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: MPRINT to carry macro parameter info?
In-Reply-To:  <200810231629.m9NAkq3P015958@malibu.cc.uga.edu>
Content-Type: text/plain; charset=us-ascii

I provide a method for macros to self-report when testing in this paper:

Writing Testing-Aware Programs that Self-Report when Testing Options are True

http://www.sascommunity.org/wiki/Writing_Testing_Aware_Programs

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

> -----Original Message----- > From: owner-sas-l@listserv.uga.edu > [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of Ya Huang > Sent: Thursday, October 23, 2008 12:29 PM > To: SAS-L@LISTSERV.UGA.EDU > Cc: Ya Huang > Subject: MPRINT to carry macro parameter info? > > Hi there, > > MPRINT is very useful for debugging. I wonder if there is a > way to make > it even useful by adding the parameters currently calling. In > other word, > I wonder if it is possible to have the log showing > > MPRINT(DOIT(Alice)): > > instead of currently only showing > > MPRINT(DOIT): > > %DOIT is very long, when I search and find the WARNING message > from log, I'd like to know just by looking at the left hand side > mprint and know what parameters caused the problem. > > Thanks > > Ya > > > 1 > 2 %macro doit(name); > 3 proc print data=sashelp.class (where=(name="&name")); > 4 run; > 5 %mend doit; > 6 > 7 options mprint; > 8 > 9 %macro doagain; > 10 %doit(Alice); > 11 %doit(Judy); > 12 %doit(Mary); > 13 %mend doagain; > 14 > 15 > 16 %doagain; > MPRINT(DOIT): proc print data=sashelp.class (where=(name="Alice")); > MPRINT(DOIT): run; > > NOTE: There were 1 observations read from the data set SASHELP.CLASS. > WHERE name='Alice'; > NOTE: PROCEDURE PRINT used: > real time 0.00 seconds > cpu time 0.00 seconds > > > MPRINT(DOAGAIN): ; > MPRINT(DOIT): proc print data=sashelp.class (where=(name="Judy")); > MPRINT(DOIT): run; > > NOTE: There were 1 observations read from the data set SASHELP.CLASS. > WHERE name='Judy'; > NOTE: PROCEDURE PRINT used: > real time 0.01 seconds > cpu time 0.01 seconds > > > MPRINT(DOAGAIN): ; > MPRINT(DOIT): proc print data=sashelp.class (where=(name="Mary")); > MPRINT(DOIT): run; > > NOTE: There were 1 observations read from the data set SASHELP.CLASS. > WHERE name='Mary'; > NOTE: PROCEDURE PRINT used: > real time 0.01 seconds > cpu time 0.01 seconds > > > MPRINT(DOAGAIN): ; > >


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