From: Jack Hamilton on 29 Jan 2010 02:36 The SASHELP views (I assume you mean things like sashelp.vcatalg) are views of the dictionary tables, which are in turn views of SAS internal data. The sashelp views can be used anywhere a regular view or table can be used (data step, sql, viewtable, etc.). The dictionary tables can be used only in proc sql in base sas. In the past, dictionary tables were faster, especially with WHERE clauses applied. I don't know if that is still true, but I would guess that it is. -- Jack Hamilton jfh(a)alumni.stanford.org Caelum non animum mutant qui trans mare currunt. On Dec 31, 2009, at 11:27 pm, jiyuan123 wrote: > Dear SAS-Lers, > > I have some doubt about SASHELP View and Dictionary tables ? > > what is different about these? > > and What should I use? > > thanks a lot. > > 2010-01-01 > > > > jiyuan123
From: Frank DiIorio on 29 Jan 2010 08:16 On Jan 29, 2:36 am, j...(a)STANFORDALUMNI.ORG (Jack Hamilton) wrote: > The SASHELP views (I assume you mean things like sashelp.vcatalg) are views of the dictionary tables, which are in turn views of SAS internal data. > > The sashelp views can be used anywhere a regular view or table can be used (data step, sql, viewtable, etc.). > > The dictionary tables can be used only in proc sql in base sas. > > In the past, dictionary tables were faster, especially with WHERE clauses applied. I don't know if that is still true, but I would guess that it is. > > -- > Jack Hamilton > j...(a)alumni.stanford.org > Caelum non animum mutant qui trans mare currunt. > > On Dec 31, 2009, at 11:27 pm, jiyuan123 wrote: > > > Dear SAS-Lers, > > > I have some doubt about SASHELP View and Dictionary tables ? > > > what is different about these? > > > and What should I use? > > > thanks a lot. > > > 2010-01-01 > > > jiyuan123 http://www.codecraftersinc.com/pdf/DictionaryTablesRefCard.pdf summarizes the more commonly used (that's subjective, I know) Tables and Views. It applies to Version 9.1.3.
From: Arthur Tabachneck on 29 Jan 2010 08:02 Jiyuan, Jack already explained some of the differences. You asked which one you should use and another possible choice is to simply make your own. E.g.,: data want (keep=name); dsn='sashelp.class'; length name $32; do dsid = open(dsn,'I') while(dsid ne 0); do i = 1 to attrn(dsid,'NVARS'); name = varname(dsid,i); output; end; dsid = close(dsid); end; run; That will probably run faster than either and has the added benefit of letting you decide what information you want the file to include. Art --------- On Fri, 1 Jan 2010 15:27:42 +0800, jiyuan123 <jiyuan123(a)GMAIL.COM> wrote: >Dear SAS-Lers, > > I have some doubt about SASHELP View and Dictionary tables ? > > what is different about these? > > and What should I use? > >thanks a lot. > >2010-01-01 > > > >jiyuan123
From: Michael Raithel on 29 Jan 2010 08:33 Dear SAS-L-ers, In a continuation of this thread, Art posted the following: > -----Original Message----- > Jack already explained some of the differences. You asked which one > you > should use and another possible choice is to simply make your own. > E.g.,: > > data want (keep=name); > dsn='sashelp.class'; > length name $32; > do dsid = open(dsn,'I') while(dsid ne 0); > do i = 1 to attrn(dsid,'NVARS'); > name = varname(dsid,i); > output; > end; > dsid = close(dsid); > end; > run; > > That will probably run faster than either and has the added benefit of > letting you decide what information you want the file to include. > Art, ooh, very nice; very clever! Hey, as long as we are talking about roll-your-own alternatives, the OP could do this: proc contents data=sashelp.class out=class noprint; run; ....to get scads of additional information, and then drop/keep variables as necessary. Yep, there is more than one way to skin a tribble! <--With BIG apologies to Alian Rights organizations! Best of luck in all of your SAS endeavors! I hope that this suggestion proves helpful now, and in the future! Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote the book on performance" E-mail: MichaelRaithel(a)westat.com Author: Tuning SAS Applications in the MVS Environment Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172 Author: The Complete Guide to SAS Indexes http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Doctor, I am well aware of human characteristics. I am frequently inundated by them, but I've trained myself to put up with practically anything. - Mr. Spock +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From: Arthur Tabachneck on 29 Jan 2010 08:45
Michael, Since it's Friday, and some on the list are probably too young to know, Michael's concern about Alien Rights organizations was related to: http://en.wikipedia.org/wiki/Tribble Art -------- On Fri, 29 Jan 2010 08:33:08 -0500, Michael Raithel <michaelraithel(a)WESTAT.COM> wrote: <snip> >Yep, there is more than one way to skin a tribble! <--With BIG apologies to Alian Rights organizations! |