Date: Sat, 4 Nov 2006 16:28:17 -0500
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: Re: OT: Chance to Make SAS-L History: Did You Know That...
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
What going on did we reach the 150 or 300 posts (as david said ) or we are
out tips, Just curious if there any tips uisng SQL or Little Utlity macros
or some Domain knowledge, What I have in mind is people working various
different fields Like people working in Pharma Industry use SAS for mostly
do Tables and listings and DM work. They can share their valuable experience
(tricks or tips ) unique to their field, I do not know how SAS is used in
Financial sector ( do we have a similar kind of Knowledge ) or in energy
sector or Eductional sector or Pharama Marketing ?? Or Usefull Url's for
Here is another trick I use often at my work place
Use PROC SQL dictionary tables to create a macro variable containing the
variable names from a specified data set.
Use PROC DATASETS to execute the rename.
col1=1; col2=2; col3=3; col5=5;
proc sql noprint;
into :varlist separated by ' '
WHERE LIBNAME EQ "WORK" and MEMNAME EQ "A"
and upcase(name) like 'COL%';
proc datasets library=work nolist;
On 11/3/06, SAS_learner <firstname.lastname@example.org> wrote:
> Small Tip/Trick I learned from my manager who is also SAS-L Member. This
> is close to call symput but runs on data rather than on metadata
> Do something samething in all datasets in a lib you can do something like
> this,Here I am droppping one variable from all the datasetsn
> %macro octa(ds= );
> data datout.&ds;
> set datout.&ds ;
> drop OCTA_SEQ;
> proc sql noprint;
> select '%octa('||'ds= '||lowcase(memname)||')' into :blanks separated by
> from dictionary.tables
> where lowcase(libname) = 'datout';