Date: Fri, 2 Dec 2005 10:41:16 -0800
Reply-To: SAS_my_life <subramanyam.phani@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_my_life <subramanyam.phani@GMAIL.COM>
Subject: Re: How to drop One variable from all the datasets
Content-Type: text/plain; charset="iso-8859-1"
I am trying to implement your sample code for dropping One variable
from whole library , I am not sure what is the that I am doing wrong it
keeps complaining like this
153 proc sql noprint;
154 select 'alter table ' || catx('.', libname, memname) || " drop
155 into :alters separated by ';'
156 from dictionary.columns
157 where libname="&lib"
158 and name="&aberrant"
NOTE: No rows were selected.
160 %put %superq(alters);
when there is column called OCTA_SEQ which I need to drop from whole
library which is not null .
Just to this part on SAS v8 I am doing something like this ( I am
doing two proc sql because the requirment is anything that is starting
with SUPP should have all the variables expect for the OCTA_SEQ where
as other datasets go through some other process and OCTA_SEQ should be
dropped after that.
proc sql noprint;
select distinct memname into : memname separated by ' '
where lowcase(libname) = 'datout';
select distinct memname into : supps separated by ' '
where lowcase(libname) = 'datin'
and memname like 'SUPP%' ;
%let name = &memname;
%let sname = &supps;
%let mcount = &countmem;
%let scount = &countsupp;
*** Here I need to make the data step input each data set and output it
but program is stopping after updating the first dataset I know I need
to some how make my set statments in a loop but I am not quite sure how
to do it , can you help me with it .
thanks for the time and help