|
When in a large production system, e.g. dozens of libraries and each library
has dozens or hundreds of datasets, and I am using SQL, I use the
DICTIONARY.xxxxx tables instead of the SASHELP.Vyyyyy views. The tables, to
me, seem faster (perhaps the meta-information where clauses can be
internally optimized or shortcut.)
I would definitely prefer a meta-information direct access syntax for same
type entities, something like
data _null_;
set columnsOf(work.t1, work.t2);
run;
Check the online help for sashelp view details. A wish list direct access
syntax is also shown
The v6 dictionary tables are:
dictionary.catalogs catalogsOf(<list of libnames>)
dictionary.columns columnsOf(<list of tables>)
dictionary.extfiles extfilesOf(<list of filenames>)
dictionary.indexes indicesOf(<list of tables>)
dictionary.macros macrosOf(<list of macro variable names>)
dictionary.members membersOf(<list of catalogs>)
dictionary.options optionsOf(<list of option names>)
dictionary.tables tablesOf(<list of libnames>)
dictionary.titles titlesOf(<list of titles>)
dictionary.views viewsOf(<list of libnames>)
Each <list of ...> would allow a regular expression for matching purposes
--
Richard DeVenezia - SAS Macros and AF Tools
New AF Component - CheckList - available at http://www.devenezia.com/
<shiling@math.wayne.edu> wrote in message
news:8uelss$2ri$1@nnrp1.deja.com...
> In the following example, it will rename all variables begining w/ 'ab'
> into ab??01. You can modify the where clause to fit your needs. Note SAS
> only allow 8 chars for variable names in version 6 and under.
>
> data t1;
> retain ab abc bac cbs nbcs cnn 0;
> x=1;
> run;
>
> proc sql noprint;
> select compress(name||'='||name||'01') into: renstmt seperated by ' '
> from sashelp.vcolumn
> where name like 'AB%' and libname in ("WORK") and memname in ('T1')
> ;
> quit;
>
> %put (&renstmt);
>
> proc datasets lib=work;
> modify t1;
> rename &renstmt;
> quit;
>
>
>
> In article <9CEF27E1688BD411ABE500508B108FD5DA700B@sc1msg1a.mes>,
> "Boivin, Dominic" <Dominic.Boivin@MSS.GOUV.QC.CA> wrote:
> > Hi,
> > I would like to know how to add a sufix to all variables names of
> a
> > data set. For exemple, I want to rename the variable MDEF in MDEF01.
> >
> > data emreg;
> > set emreg;
> > array arRename{*} mdef--mtest;
> > do i = 1 to dim(arRename);
> > /* add 01 to the name of arRename{i} */
> >
> > end;
> > run;
> >
> > Dominic Boivin
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
|