Date: Fri, 23 Jan 2004 16:17:19 -0500
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Dropping variables in a macro
Unfortunately, all you are showing us is the names of your "black boxes"
(code files and macros), whereas the PROC and DATA steps which are spawned
from these are the context in which you must manage dataset variables.
I would guess that the first two %INCLUDEd files define the two macros, the
other five %INCLUDEd files do some data setup, and the ten macro calls do
the interesting stuff.
The solution may be to add macro parameters to introduce some KEEP/DROP
flexibility. But it's all speculation until you let us see what's in the
black boxes.
On Fri, 23 Jan 2004 14:40:32 -0500, Debbie Cooper
<debbie.cooper@STEVENSONCOMPANY.COM> wrote:
>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
|