f



Re: DICTIONARY.TABLES

Try putting your libname value in the SQL query in all CAPS.

Where libname = 'Q'



Jack Clark
Research Analyst
Center for Health Program Development and Management
University of Maryland, Baltimore County

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
SAS-FU
Sent: Thursday, October 25, 2007 11:07 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: DICTIONARY.TABLES

Any ideas why this simple code to access dictionary metadata is
returning 0 observations?  I do this all the time, and Im at a new
contract site and I feel like im taking crazy pills.

Thanks in advance.


libname q 'R:\AD-HOC\MAX_Data\DEMO';

proc sql;
create table aaa as
select memname
from dictionary.tables
where libname = 'q';
quit;
0
JClark1 (431)
10/25/2007 3:20:40 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
302 Views

Similar Articles

[PageSpeed] 34

Reply:

Similar Artilces:

Re: TABLES TABLES TABLES
sasbum@AOL.COM wrote: >How would you best describe to a retiscent SAS student that the concept of >TABLES isn't limited to SQL? This came up during a discussion on table >lookup methods - and lookup tables in particular (I mean, lookup tables >pre- >date SQL). Even SAS data sets are referred to as tables. This made the >student apoplectic. I find a visual works well here. If you show a grid with rows and columns, then you can show a picture of a SAS data set and a SQL table and a lookup table, and show that (regardless of terminology and buzzwords) they're all pr...

Re: load SAS table into DB2 temporary table
Pascal: Enclose SQL create and delete queries in a SQL EXECUTE() function and pass them through to DB2. Once you have the table created, you can insert rows of data (using BULKLOAD to speed up inserting large numbers of rows). Ask your DB2 DBA about the correct syntax for DB2 temporary table name. Sig -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of tonts Sent: Wednesday, June 30, 2004 2:31 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: load SAS table into DB2 temporary table Lois, Thanks for your answer. But the problem is a little bit different ...

Re: RE : Re: copulas and SAS
Adel, Think Joke! But, more seriously, it did prompt me to look up the origins of the copula as a functional. Joe On 9/27/06, adel F. <adel_tangi@yahoo.fr> wrote: > > Hi, > I do not know how this is related to my orginal question. > > My understanding of copula is, it is a joint distribution with uniform > margins, the problem how to obtain a copula which fits better a data? > > If there is any suggestion from members of SAS list, about examples for > copulae with SAS, I will appreciate that > > Thanks a lot > > Adel > Joe Whitehurst <joew...

Re: TABLES TABLES TABLES #2
OHHH went there, did that, got the t-shirt, even. I tried everything in the book. This person is extremely LITERAL and looking for the letter of the law, or something........maybe my trying so hard just egged him on, or his stubbornness that kept his feet in concrete, but I don't think so. He truly believes that. -----Original Message----- From: David L Cassell <davidlcassell@MSN.COM> To: SAS-L@LISTSERV.UGA.EDU Sent: Sun, 27 Nov 2005 11:55:12 -0800 Subject: Re: TABLES TABLES TABLES sasbum@AOL.COM wrote: >How would you best describe to a retiscent SAS student that the concept...

Re: SAS Tables
You can use proc transpose to get the dataset you want; data have; input Age Exp Rate; cards; 1 1 0.9 1 2 1.2 2 1 0.6 2 2 0.2 ;run; proc transpose data=have out=want; by age; var rate; id exp; run; proc print;run; 2008/11/24 J M <jasonm@ucla.edu>: > I would like to take this data: > Age Exp Rate > 1 1 0.9 > 1 2 1.2 > 2 1 0.6 > 2 2 0.2 > and create this table > 1 2 > 1 0.9 1.2 > 2 0.6 0.2 > I'm then going to export this output to Excel (which I assume should > be straightforward using ODS). > > Any suggestions? > ...

Re: TABLES TABLES TABLES #6
Ahhhh - I'm lovin' that one. TY TY In a message dated 12/1/2005 6:14:05 AM Eastern Standard Time, rdevenezia@WILDBLUE.NET writes: Friar Broccoli wrote: > Try this (a higher authority): > > http://www.google.com/search?num=100&hl=en&lr=lang_en&safe=off&as_qdr=all&q=de fine%3A+data+table&btnG=Search&lr=lang_en > > Howard Wood wrote: >> OHHH went there, did that, got the t-shirt, even. I tried >> everything in the book. This person is extremely LITERAL and >> looking for the letter of the law, or something........maybe...

Re: SAS V9.1 SQL table name re-use issue
Thanks to Peter and Bas and I will start using undopolicy=none should I like to replace a table. Regards, T J On Wed, 7 Sep 2005 12:08:10 -0400, Peter Crawford <peter1.crawford@CITIGROUP.COM> wrote: >On Wed, 7 Sep 2005 11:42:25 -0400, T J <tjpush@YAHOO.COM> wrote: > >>Hi everyone, >> >>Before SAS 9 I have lots of SQL codes that re-uses an existing table name >>and there was no warning msg. >>-------------------------------------------------------- >>data A; do i = 1 to 5 ; x= ranuni(0); output ; end; run; >> >>data b; do i ...

Re: DICTIONARY.TABLES #2
libnames are stored in UPPERCASE in dictionary.tables. On 10/25/07, SAS-FU <lee.rozzelle@gmail.com> wrote: > Any ideas why this simple code to access dictionary metadata is > returning 0 observations? I do this all the time, and Im at a new > contract site and I feel like im taking crazy pills. > > Thanks in advance. > > > libname q 'R:\AD-HOC\MAX_Data\DEMO'; > > proc sql; > create table aaa as > select memname > from dictionary.tables > where libname = 'q'; > quit; > ...

Re: Problem with dictionary.tables
Antje, Try following code see if it works: proc sql noprint; select "perm."||memname into :dsn separated by " " from dictionary.tables where libname = "PERM"; quit; data result; set perm.&dsn; run; YU On 6/26/06, antje.schuele@googlemail.com <antje.schuele@googlemail.com> wrote: > > Dear Newsgroup, > > I'd like to set a few tables together. That's why I read out my needed > tables with the help of dictionary.tables: > > Here's my code: > > proc sql noprint; > select memname into...

Re: DICTIONARY.TABLES #3
On Thu, 25 Oct 2007 15:07:21 -0000, SAS-FU <lee.rozzelle@GMAIL.COM> wrote: >Any ideas why this simple code to access dictionary metadata is >returning 0 observations? I do this all the time, and Im at a new >contract site and I feel like im taking crazy pills. > >Thanks in advance. > > >libname q 'R:\AD-HOC\MAX_Data\DEMO'; > >proc sql; >create table aaa as >select memname >from dictionary.tables >where libname = 'q'; >quit; yes, I think all libnames are in uppercase in that tables. To be sure, u could use: where upcase(libnem)="Q"; ...

Re: Lookup Table in SAS
Jerry There are a couple ways to do this in SAS. One is to create a "user defined format" and use a put statement to create a new variable based on the value of an existing variable and the format that you created. See the SAS documentation on Proc Format and the Put function. Note that the values that are used in building this format may be manually typed or may be read from a SAS data set. A second way is to merge the two tables and, based on whether there are matches between the two tables, the flag may be set with program statements. The following illustrates this approach. Data a; input values $1. ; cards; a b c d e ; Data b; informat data2 $10.; input values $1. data1 data2 ; cards; b 1 something x 2 random k 3 new proc sort; by values;* this solution requires that the two data sets be sorted. The format solution does not require sorting; run; Data final; merge b (in = in1 ) a (in=in2); by values; if in1;* select only datalines that exist in b; if in2 then flag = 1; else flag = 0;* see sas data set options discussion; proc print; run; Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Jerry Yang <jerryang@CISCO.C OM> To ...

how to add fonts to the sas registry (was RE: Re: sas/graph:
Success! A google search led me to: http://support.sas.com/documentation/onlinedoc/base/91/freetype-hub.pdf Which includes the magic option on FONTREG to use the "all" mode. (And now that I look back on the FONTREG docs, I see it there was well :-P). So here's code that works: * =================================== ; proc fontreg mode = all msglevel = verbose ; truetype 'c:\windows\fonts' ; run ; data phoney ; do n = 1 to 2000 ; x = ranuni(-1) ; if n le 1000 then grp = "one" ; else grp = "two" ; output ; end ; run ; goptions device = EMF ftext = 'Tahoma' ; ods rtf file = "c:\temp\deleteme.rtf" ; proc boxplot data = phoney ; plot x * grp ; run ; ods rtf close ; * =================================== ; Looks like I've got to add that FONTREG call anew every time (running in batch anyway). But that's tolerable... Thanks all! -Roy -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Pardee, Roy Sent: Thursday, February 28, 2008 8:12 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: sas/graph: using truetype fonts w/ODS RTF output on windows Thanks for the response Mary! Huh, strange. So you run that code unaltered & get Tahoma in the graphic in the .rtf file? I just now tried adding this before the 'data phoney ;' line: proc fontreg mode = replace ; truetype 'c:\windows\fonts' ; run ; And I get ...

Re: SAS Table help
Summary: Possible answers - data manipulation. #iw-value=1 Monti, This might be what you want. data want ( where = (pctmiss > 10) ) ; set have ; /* see data below */ nmiss = nmiss (of item: ) ; /* or nmiss (of itema -- itemf ) ; */ /* or nmiss ( itema, itemb, itemc, itemd, iteme, itemf ) ; */ pctmiss = 100 * nmiss / 6 ; run ; I have assumed your second requirement > Another requirement to create the above table where the missing > values greater than 10% of the total records. means greter than 10% of the items on a record. If you really mean of total records, then I do not understand the problem. Perhaps you should show how to calculate by hand what is wanted. In genereral you will find the data structure product item stat a a 1 a b . a c 2 ... b a 2 ... far more flexible. One way to get this would be proc transpose data = have out = good (rename=(col1=stat)) ; by product ; var item: ; run ; Here you might mean proc summary data = good ; class _name_ ; var stat ; output out = summary nmiss=nmiss ; run ; data want ; set summary ; where nmiss > .1 * _freq_ ; pct = 100 * nmiss / _freq_ ; run ; Ian Whitlock =============== Date: Mon, 2 Feb 2009 13:14:41 -0800 From: Mahbub Khandoker <mk_sas1@YAHOO.CA> Subject: SAS Table help Hi there...

Re: How to create a TABLE in SAS?
Hi, Fred. So, I'm presuming that A and B have the same number of observations, and that observation k in A corresponds to observation k in B. Then you can do: data C; merge A B; * will merge row by row; run; %let ct = p; %* p output pearson correlations, h for hoeffding, k for kendall, s for spearman; proc corr data=C out&ct.=&ct. (where = (_type_="CORR")) noprint; var b:; with a:; run; The output data set will have the b variables as columns, the a variables as rows, identified by the _NAME_ variable (there will also be a variable called _type_, with all val...

Re: hierarchical table with SAS
Bruno, SAS is a programming language rather than a database. Hence you have to program the sort of thing you are asking for yourself. The structure of the data will strongly influence how easy or hard your programs are. As you have given the request, you are destroying information. For example, you no longer can tell who the father of 760 is. I would be inclined to restructure the data with data family ; set hierarchy ; retain family ; if father = " " then family = son ; run ; Now to obtain the family headed by 700 use proc print data = family ; where family = &...

Re: Summary: Re: Table combining tables? PROC FREQ or maybe
Hi Peter, The log might help us see whats going on.....But for now, you can check by running a summary of your raw data.... proc summary data = today ; class prop_part ; var v3_1 -- v3_15 ; output out = tot sum = ; run ; proc print data=tot ; run ; From the 'tot' dataset, look in _type_ = 0, which is the sum of all variables. If this sum matches the proc freq output which you showed below, then it may be a data issue. If not, then looking at the log might help...... On Sat, 28 Jun 2008 22:15:39 -0400, Peter Flom <peterflomconsulting@MINDSPRING.COM> wrote: >Hi again > >Just to clarify what's going on before I go to bed: > >I had a data set. I printed the first 10 observations on key variables, and sent it to the list, and Howard (among others) gave a solution. > >Then I ran that solution on my original data, and got the wrong results. > >What I sent to the list came from: > >proc print data = today (obs = 10); > var v3_1:--v3_15 prop_part; >run; > >and looked like this > > prop_ >Obs V3_1 V3_2 V3_3 V3_4 V3_5 V3_6 V3_7 V3_8 V3_9 V3_10 V3_11 V3_12 V3_13 V3_14 V3_15 part > >1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1: Som >2 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2: All >3 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 2: All >4 0 0 0 0 0 1 ...

Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727
Nice thread guys .... I guess this is what open source development is all about .... Got me thinking about suggesting a code/macro library on sascommunity.org? Any thoughts? ...

Re: SAS Job websites WAS(Re: SAS jobs for freshers in US
On Fri, 24 Mar 2006 11:27:44 -0500, Steven Raimi <steven.raimi@ONSTAR.COM> wrote: >Another very helpful (and focused) web site for SAS jobs is >icrunchdata.com. I'll try to ....post from home later, where I have a set of links (I don't have them at my new job here, which, FYI, I found via Monster). I'll also try to avoid fumble-fingering that accidently posts my messages before I'm done writing them! Steve ...

Re: RE : Re: copulas and SAS #3 674067
joewhitehurst@GMAIL.COM replied: > >Adel, > >You may find the following artilce interesting. [article by Thomas Mikosch not copied] This is a really good article, and a really useful point to make. But 55K is a lot of article to copy. Would it have been easier to point to a URL? The people who read SAS-L as a digest and the people who have slow connections are probably not overly thrilled. I'll refrain from pointing out that you sound like me today. ("Are you sure you want to do this? Here's some material which suggests you should try a different approach..."...

Re: Recover Deleted SAS Table
most important: DO NOTHING, ALSO NOT OUTSIDE SAS which could replace the file. Now use a undelete tool, which you downloaded from web with another PC (do it not on the PC the file is on)! The place is not reserved and might be used by any software to store something. In that case you have no good chance! One of many examples: http://www.undelete-plus.com/download.html But there are many... Don't install that on your PC! That might replace parts of your deleted file! Install it on a USB stick and start it from that. Look in web for a tool which is able to do that! If that is successful, you should look for your file with the extention .sas7bdat and restore that. Have a look into the library with SAS and try to open it then. Hope, that this will work. On Tue, 16 Dec 2008 07:58:10 -0600, OR Stats <stats112@GMAIL.COM> wrote: >Hello: > >I created a library within SAS that points to a folder in MyDocuments. I >have XP OS. I accidentally deleted one of my SAS tables in this folder. >And I need that table. I went to my Recycling bin but did not find the >table in there. I have not closed my SAS program and have not rebooted. Is >there any way I can recover this table? > >Thanks! ...

Re: Lookup Table in SAS #3
hi ... in the true spirit of "beating a question to death" ... here are a couple more to add to those already posted (though Howard Schreier's SQL solution is so elegant that I wonder why one would do anything different) ... given data sets a and b data a; input values : $1. @@; datalines; a b c d e ; run; data b; input values : $1. data1 data2 : $ 10.; datalines; b 1 something x 2 random k 3 new ; run; * add an index to data set a; proc datasets lib=work nolist; modify a; index create values; quit; data c; set b; set a key=values/unique; flag = not (_error_); * add the next statement if you don't like RC messages in the LOG; _error_= 0; run; * create a lookup string from data set a; data c; length ina $50; do until(lasta); set a end=lasta; ina = catt(ina,values); end; do until(lastb); set b end=lastb; flag = (find(ina,values) gt 0); output; end; drop ina; run; * a tweak of Nat Wooding's MERGE solution (get rid of IF) ... assumes sorted data sets; data c; merge a (in=ina) b (in=inb); by values; flag = ina; if inb; run; -- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475 > Hello, > > Suppose I have dataset called "Lookup_SAS" that has the following values > with 1 variable called values > > values > -------- > a > b > c > d > e > > > I ha...

Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #2
Graham , I am not sure that the SI Tech Support examples should have all the error checking that Chang wanted to throw in the macro. The examples should be clear concise and easy to read and get going, as well as be illistrative. Too much error checking in an example well is just over kill and even detrimental to an example. However, any code solution on the SI Tech Support web sit should follow basic rules of good practices and sound advice. Such as with thier macros having atleast a somewhat good Macro design. Look at Example SAS Sample 1728: The first method well lets say is soooo bad...

Re: Summary: Re: Table combining tables? PROC FREQ or maybe #2
I've now got several solutions.... SAS-L is great! But the odd behavior of Howard's program on two datasets that ought to have been the same is still puzzling. Hari Nath <hari_s_nath@YAHOO.COM> wrote > >The log might help us see whats going on.....But for now, you can check by >running a summary of your raw data.... > >proc summary data = today ; > class prop_part ; > var v3_1 -- v3_15 ; > output out = tot sum = ; >run ; > >proc print data=tot ; >run ; > >From the 'tot' dataset, look in _type_ = 0, which is the sum of all >variables. If this sum matches the proc freq output which you showed >below, then it may be a data issue. If not, then looking at the log might >help...... > > The _type_ = 0 did not match the weird FREQ output that I had gotten. So, here's the log from running Howard's program on my data. I don't know if it will help. <<<<< 219 220 data numbered; number + 1; set today3; run; NOTE: There were 609 observations read from the data set WORK.TODAY3. NOTE: The data set WORK.NUMBERED has 609 observations and 25 variables. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.03 seconds 221 222 proc transpose data=numbered out=long; 223 by number prop_part; 224 var v3_ : ; 225 run; NOTE: Numeric variables in the input data set will be converted to character in the out...

Re: Recover of the variables of a SAS table
Ramsamy, Are you just looking for something like: proc sql noprint; select name into :namelist separated by ' ' from Dictionary.Columns where libname eq "SASHELP" and memname eq "CLASS"; quit; %put &namelist.; HTH, Art -------- On Sun, 23 Dec 2007 09:15:54 -0800, ash007 <RamsamyAshley@GMAIL.COM> wrote: >On Dec 23, 3:37 pm, "LWn" <lars.without_this_part.wahlg...@stat.lu.se> >wrote: >> Could this help? >> >> proc contents data=datasetname ; >> run ; >> >> /LWn >> >> "ash007" <RamsamyAsh...@gmail.com> skrev i meddelandetnews:dc866f3b- dd83-4816-b369-207d4a0a9d14@s8g2000prg.googlegroups.com... >> >> > Hello everybody, >> >> > Is someone know how to recover the name of the variables of a SAS >> > table ? >> >> > thank. >> >> > ash007. > >thank but I need to put all the variables of a table in a macro >variable. On Dec 23, 8:44 pm, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Ramsamy, > > Are you just looking for something like: > > proc sql noprint; > select name > into :namelist > separated by ' ' > from Dictionary.Columns > where libname eq "SASHELP" > and memname eq "CLASS"; > quit; > %put &namelist.; > &g...

Web resources about - Re: DICTIONARY.TABLES - comp.soft-sys.sas

Dictionary - Wikipedia, the free encyclopedia
According to Nielsen (2008) a dictionary may be regarded as a lexicographical product that is characterised by three significant features: (1) ...

Dictionary.com Dictionary & Thesaurus goes 7.0 with interface improvements
In September, Dictionary.com Dictionary & Thesaurus was updated to version 6.0 with a significant redesign that introduced a fresh look and feel ...

Price Drop: Textkraft with German Dictionary
Textkraft with German Dictionary 3.1.3 Device: iOS iPad Only Category: Productivity Price: Free, Version: 3.1.3 ( iTunes ) Description: Das ...

'Rabid Feminist' and Other Sexist Sentences Should Be Excluded From the Oxford Dictionary ASAP
It's a source that's meant to inform and educate but the Oxford English Dictionary recently came under fire for being sexist. Michael Oman-Reagan, ...

'Mx.' instead of 'Mr.' or 'Mrs.?' It's in the dictionary now
Among the words officially added to dictionary.com this week is &quot;Mx.,&quot; pronounced &quot;mix&quot; and defined as &quot;a title of respect ...

'Identity' is Dictionary.com's word of the year - CNN.com
Race, sexuality and gender are the live-wire topics that inspired Dictionary.com to pick "identity" as its word of the year for 2015.

Jimmy Fallon, Nathan Lane play 'Kid Dictionary' on 'The Tonight Show' - EW.com
Jimmy Fallon, Nathan Lane play 'Kid Dictionary' on 'The Tonight Show' - EW.

The Original Hacker's Dictionary For Small Business Owners
A cybersecurity book and glossary for newbies and small business owners.

But That Isn't A Word: Oxford Dictionary Chooses The Face With Tears Of Joy Emoji As Word Of The Year ...
Because even dictionary companies want to feel edgy from time to time, Oxford Dictionaries has announced the 'face with tears of joy' emoji is ...

Athleisure Is Officially In the Dictionary, But What Does It Mean?
Come 2016, the eye roll-inducing label given to fashion's fascination with evolved workout layers will be added to the Merriam-Webster dictionary. ...

Resources last updated: 3/17/2016 5:46:31 PM