BookmarkSubscribeRSS Feed
astha8882000
Obsidian | Level 7

Hi All,

 

would be really helpful if you could answer the following 2 questions:

 

1. I saw the following in one of the codes:

 

proc sql;
create table sqltest."##Drvr_Nbr_%sysget(USER)"n as
select statements.....

 

what does a sqltest table mean? 

 

2. 

I saw user_work.[dataset_name] in some places. Here does user_work refer to as a permanent or a temp libref?

 

Appreciate your help!

Thank you.

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26

SQLTEST in this case is a library reference, probably pointing to a database.

 

User_work is a permanent library. The only temporary library in SAS is WORK

--
Paige Miller
ballardw
Super User

@astha8882000 wrote:

Hi All,

 

would be really helpful if you could answer the following 2 questions:

 

2. 

I saw user_work.[dataset_name] in some places. Here does user_work refer to as a permanent or a temp libref?

 

Appreciate your help!

Thank you.

 


How sure are you that the code was "user_work.". Libraries are limited to 8 character names. I suspect someone may have been discussing default library names for single references in some fashion. By default most installations have WORK as the default single reference library, so when you use data=junk SAS automatically treats it as data=work.junk. But you can have a library defined as USER and when set it becomes the default for single level names and you have to explicitly use work.junk. And the USER library is not temporary.

 

I think we would have to see the original code and comments in more detail to get a more precise response.

PaigeMiller
Diamond | Level 26

@ballardw wrote:


How sure are you that the code was "user_work.". Libraries are limited to 8 character names.

Good catch, @ballardw!

--
Paige Miller
SuryaKiran
Meteorite | Level 14

SAS libraries are in general referenced by two level name (libref.filename),if you don't specify the libref or libref is WORK then
SAS stores temporarialy.

libref will be the nick name you defiend in your LIBNAME statement

LIBNAME mydata "/user/path/";
LIBANME ORA Oracle user= password= schema=;

Here mydata will reference the physical path location and where as ORA will reference to Oracle.

 

 

So you need to know how these libraries are referenced.

Thanks,
Suryakiran

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 632 views
  • 2 likes
  • 4 in conversation