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 (December 1999, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Dec 1999 10:11:46 -0000
Reply-To:     Richard Paterson <RichardP@OCS-CONSULTING.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Richard Paterson <RichardP@OCS-CONSULTING.COM>
Subject:      macro problem, unresolved variable while using call execute
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

hi folks,

first I wish you all a happy new year and would like thank you sincerely for the all the help and advice over the past months.

when I call the following macro in opencode then everything runs good. If I call the macro using a CALL EXECUTE from a dataset

like

DATA _null_; call execute('%formats(dataset)'); RUN;

then the format &socfmt. is not resolved. The macro VARFMT sets socfmt as global. what is the difference between running the code using call execute and from open code ?

Any help appreciated.

Regards Richard

%macro formats(dset);

DATA qqsocs; SET &dset (KEEP=soc1 soc2 soc3 socdesc1 socdesc2 socdesc3); output; soc1=soc2; socdesc1=socdesc2; output; soc1=soc3; socdesc1=socdesc3; output; KEEP soc1 socdesc1; RUN;

** create format socfmt. from SOC1 with label SOCDESC1 to format the **; ** SOC items **;

%VarFmt(qqsocs, socfmt,SOC1, SOCDESC1);

PROC DATASETS NOLIST; DELETE qqsocs; MODIFY &dset; FORMAT soc soc1 soc2 soc3 &socfmt..; RUN;

%MEND formats;


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