Date: Wed, 24 Nov 2004 13:25:49 -0600
Reply-To: "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Dunn, Toby" <Toby.Dunn@TEA.STATE.TX.US>
Subject: Re: Problem with %scatmat
Content-Type: text/plain; charset="iso-8859-1"
I am not sure why you are using %include on a %macro?
Okay when defining a %macro one can use either no parameters (here is were its best I think to use a %include instead of %macro), positional parameters, and keyword parameters.
Where using keyword parameters will allow the macro to have defaults set so that the user does not have to input all parameters.
if the macro was invoked say without these keyword parameters set in the macro call, and they were not defaulted, you get the error you are seeing.
My best advice would be to not %include the macro, but rather move the definition to the autocall lib, and then invoke like a normal macro definition, but this time specify width = <some width> and interp = <with an appropriate value>.
From: SAS(r) Discussion on behalf of Pardee, Roy
Sent: Wed 11/24/2004 1:07 PM
Subject: Problem with %scatmat
I'm trying to make use of Michael Friendly's %scatmat macro, which
creates scatterplot matrices. It's available & documented at:
When I save that macro (and its dependencies) off to a file & then
%include it into my program & try to run the sample code on that page, I
get this in my log:
MPRINT(SCATMAT): * default symbol height, if hsym not specified;
MPRINT(SCATMAT): ht = scan('1.4 2.3 3 3.7 4.2 4.5 5 5.3 5.4 5.5 5.6
MPRINT(SCATMAT): call symput('HT',trim(left(put(ht,3.1))));
INFO: Character variables have defaulted to a length of 200 at the
places given by: (Line):(Column). Truncation may result.
MPRINT(SCATMAT): *-- How many levels of group variable? --;
MPRINT(SCATMAT): proc freq data = gnu;
MPRINT(SCATMAT): tables gp / noprint out=_DATA_;
MPRINT(SCATMAT): data _null_;
MPRINT(SCATMAT): set _LAST_(obs=1) nobs=ngroups;
MPRINT(SCATMAT): call symput( 'NGROUPS', put(ngroups,3.) );
ERROR: The keyword parameter INTERP was not defined with the macro.
ERROR: The keyword parameter WIDTH was not defined with the macro.
I'm running sas v8.2 on win2k. Has anybody seen this &/or does anybody
have advice for me?
Center For Health Studies (Cancer Research Network)
Group Health Cooperative
This message and any attached files might contain confidential
information protected by federal and state law. The information is
intended only for the use of the individual(s) or entities originally
named as addressees. The improper disclosure of such information may be
subject to civil or criminal penalties. If this message reached you in
error, please contact the sender and destroy this message. Disclosing,
copying, forwarding, or distributing the information by unauthorized
individuals or entities is strictly prohibited by law.