LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 1996, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Mar 1996 09:20:03 -0500
Reply-To:     Joe Carpenter <jcarpent@GNU.UVM.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Joe Carpenter <jcarpent@GNU.UVM.EDU>
Subject:      Calling Global Variables Conditionally from a Nested Macro

I would appreciate any help in calling global variables conditionally from a nested macro. The program structure is similar to the following:

%global COUNT1 COUNT2 COUNT3 COUNT4 COUNT5; %macro one (parameters);

macro statements; call symput statements to set up global vars;

invoke macro 2 with parameters 1, 2, 3, 4, or 5, depending on which global count variable is needed; %mend macro 1;

%macro2 (countparameter);

%if &count&countparameter > 0 %then %do; e.g., &count3 program statements; %end; %mend macro2;

I would appreciate help with the %if statement - how to have the macro variable be read as &count1 to &count5, depending on invocation.

Joe Carpenter Data Analyst, Biometry Facility University of Vermont (802) 656-0619 email: jcarpent@zoo.uvm.edu


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