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 (January 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 Jan 2004 11:48:53 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Dropping variables in a macro
Comments:   To: Debbie Cooper <debbie.cooper@STEVENSONCOMPANY.COM>

Debbie, what you have below just calls other programs and then executes ten macros supposedly within the programs. You'll need drop or keep statements within the called programs, or in data steps between the program %includes. You could modify the programs to pass the drop or keep lists from your macro calls at the bottom.

hth

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: Debbie Cooper [mailto:debbie.cooper@STEVENSONCOMPANY.COM] Sent: Friday, January 23, 2004 11:41 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Dropping variables in a macro

You have helped me out before so I thought I'd try again. I have the following code:

%include 'd:\programs\ssi\brwindoor.sas'; %include 'd:\programs\ssi\outwindoor.sas';

*** Window and Door runfirst ****;

%include 'd:\programs\ssi\2003m12\window\ssiprod221.sas'; %include 'd:\programs\ssi\2003m12\window\ssiprod224.sas'; %include 'd:\programs\ssi\2003m12\window\ssiprod223.sas'; %include 'd:\programs\ssi\2003m12\window\ssiprod226.sas'; %include 'd:\programs\ssi\2003m12\window\ssiprod225.sas';

%brconv1 (window0312a); %brconv1 (doorpat0312a); %brconv1 (doorent0312a); %brconv1 (doorstrm0312a); %brconv1 (doorgar0312a);

%outconv (window0312a); %outconv (doorpat0312a); %outconv (doorent0312a); %outconv (doorstrm0312a); %outconv (doorgar0312a);

The problem is that there are a bunch of variables in (for example) ssiprod224 that don't belong in any of the other datasets. But because of the order in which things run, they get picked up by all the datasets. Even if I create another %include program that drops out variables, it will drop out the variables from all the datasets and that isn't what I want. Short of creating a drop program for each of the datasets, is there any way to get rid of the variables that are getting picked up by the other datasets?

Thanks, Debbie


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