BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Ronein
Meteorite | Level 14
Hello
In SAS I see a library called TeraData where I can see TeraData tables.
This teradata library was created by the admin person.
I would like to know this library path but the admin person is not available.
I see the library in:
Servers
LabRet
TeraData

Let's say that I want to know the path of this TeraData library.
What is the way to check it?
1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

This libname is either defined in an autoexec or more likely in SAS Metadata. You should have read access to both and though could work out what you need.

libname list or the SAS dictionary tables unfortunately don't surface 100% of the options and though it's always a bit hard to determine the details.

 

But.... is this the same Teradata server and schema that you already use in this question of yours? If so then you've got already all the info you need to create a libname statement.

Patrick_0-1704706510469.png

libname mytera teradata
  server=dwprod schema=DWP_vall authdomain=TeraDataAuth CONNECTION=GLOBAL 
  dbmstemp=yes
  ;

 

View solution in original post

7 REPLIES 7
Amir
PROC Star

Hi,

 

If I've understood you correctly, the documentation has a page Examples: View Information about a Library . One such example from there is:

 

libname myfiles 'c:\example';
libname myfiles list;

 

which gives the path and other information:

NOTE: Libref=   MYFILES
      Scope=    DMS Process
      Engine=   V9
      Physical Name= c:\example
      Filename= c:\example
      Owner Name= userid
      File Size=              8KB
      File Size (bytes)= 8192

 

You could try something similar, such as:

libname teradata list;

 

 

Thanks & kind regards,

Amir.

LinusH
Tourmaline | Level 20

Another option is to query dictionary.libnames:

82   proc sql;
83   describe table dictionary.libnames;
NOTE: SQL table DICTIONARY.LIBNAMES was created like:
create table DICTIONARY.LIBNAMES
  (
   libname char(8) label='Library Name',
   engine char(8) label='Engine Name',
   path char(1024) label='Pathname',
   level num label='Library Concatenation Level',
   fileformat char(8) label='Default File Format',
   readonly char(3) label='Read-only?',
   sequential char(3) label='Sequential?',
   sysdesc char(1024) label='System Information Description',
   sysname char(1024) label='System Information Name',
   sysvalue char(1024) label='System Information Value',
   temp char(3) label='Temp Access?'
  );
84   quit;
Data never sleeps
Ronein
Meteorite | Level 14

Here is the Log output when I run 

 

libname teradata list;

Can anyone tell me what is the libaname that I should run that reflect the libname to TeraData?

 

Then I want to see how to add dmstemp=yes???

 

 

Spoiler
1                                                          The SAS System                              08:36 Monday, January 8, 2024

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program (4)';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         
27         Libname Teradata list;
NOTE: Libref=   TERADATA 
      Scope=    Object Server
      Engine=   TERADATA
      Physical Name= dwprod
      Schema/User= udkdw02
28         
29         
30         GOPTIONS NOACCESSIBLE;
31         %LET _CLIENTTASKLABEL=;
32         %LET _CLIENTPROCESSFLOWNAME=;
33         %LET _CLIENTPROJECTPATH=;
34         %LET _CLIENTPROJECTPATHHOST=;
35         %LET _CLIENTPROJECTNAME=;
36         %LET _SASPROGRAMFILE=;
37         %LET _SASPROGRAMFILEHOST=;
38         
39         ;*';*";*/;quit;run;
40         ODS _ALL_ CLOSE;
41         
42         
43         QUIT; RUN;
44         

 

 

Ronein
Meteorite | Level 14

I run this code 

create table DICTIONARY.LIBNAMES
  (
   libname char(8) label='Library Name',
   engine char(8) label='Engine Name',
   path char(1024) label='Pathname',
   level num label='Library Concatenation Level',
   fileformat char(8) label='Default File Format',
   readonly char(3) label='Read-only?',
   sequential char(3) label='Sequential?',
   sysdesc char(1024) label='System Information Description',
   sysname char(1024) label='System Information Name',
   sysvalue char(1024) label='System Information Value',
   temp char(3) label='Temp Access?'
  );
quit;

Result in Log is

1                                                          The SAS System                              08:36 Monday, January 8, 2024

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program (4)';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         
27         create table DICTIONARY.LIBNAMES
28           (
29            libname char(8) label='Library Name',
30            engine char(8) label='Engine Name',
31            path char(1024) label='Pathname',
32            level num label='Library Concatenation Level',
33            fileformat char(8) label='Default File Format',
34            readonly char(3) label='Read-only?',
35            sequential char(3) label='Sequential?',
36            sysdesc char(1024) label='System Information Description',
37            sysname char(1024) label='System Information Name',
38            sysvalue char(1024) label='System Information Value',
39            temp char(3) label='Temp Access?'
40           );
41         quit;
42         
43         GOPTIONS NOACCESSIBLE;
44         %LET _CLIENTTASKLABEL=;
45         %LET _CLIENTPROCESSFLOWNAME=;
46         %LET _CLIENTPROJECTPATH=;
47         %LET _CLIENTPROJECTPATHHOST=;
48         %LET _CLIENTPROJECTNAME=;
49         %LET _SASPROGRAMFILE=;
50         %LET _SASPROGRAMFILEHOST=;
51         
52         ;*';*";*/;quit;run;
53         ODS _ALL_ CLOSE;
54         
55         
56         QUIT; RUN;
57         

What can we learn from it?

Kurt_Bremser
Super User

This was posted as a DESCRIPTION. You do not run it ever, you look at it to see how the dynamic DICTIONARY table is defined.

Query DICTIONARY.LIBNAMES in PROC SQL (use a WHERE clause for libname, name in uppercase!) to get the metadata of the library you want information for.

Patrick
Opal | Level 21

This libname is either defined in an autoexec or more likely in SAS Metadata. You should have read access to both and though could work out what you need.

libname list or the SAS dictionary tables unfortunately don't surface 100% of the options and though it's always a bit hard to determine the details.

 

But.... is this the same Teradata server and schema that you already use in this question of yours? If so then you've got already all the info you need to create a libname statement.

Patrick_0-1704706510469.png

libname mytera teradata
  server=dwprod schema=DWP_vall authdomain=TeraDataAuth CONNECTION=GLOBAL 
  dbmstemp=yes
  ;

 

Ronein
Meteorite | Level 14

I see that the only information that you took from information in Log   (Of code Libname Teradata list;) is 

Physical Name= dwprod

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 517 views
  • 2 likes
  • 5 in conversation