BookmarkSubscribeRSS Feed
JohnT
Quartz | Level 8

Gday,

I'm trying to create the LIBNAME OS in DI Studio 4.21 running on a Windows 64bit server.  When I attempt to register tables it won't let me do it.

I have successfully created NS, GIOS, GINS, CAT, NS_OLD, and registered tables with them.

I suspect OS has been reserved.

Is this really the case?

Is there a way I can register it?

Right now, all the Enterprise Guide users have all the libraries mapped except for OS.  I have suggested for the time being they just put it in the first line of code, as a short term solution.

Thanks

5 REPLIES 5
twocanbazza
Quartz | Level 8

Can you assign the libname in code in EG, that would show if there is a problem with the syntax etc.

Barry

JohnT
Quartz | Level 8

Hi Barry,

Yes, we can all assign the library OS in EG.  We put it in the first line of code that need to reference that library.

I can even assign it in the User Writen Code in DI Studio.

19 libname oS list;

NOTE: Libref= OS

Scope= IOM ROOT COMP ENV

Engine= V9

Physical Name= F:\SAS\Lev1\SASApp\Windows_NT

Filename= F:\SAS\Lev1\SASApp\Windows_NT


^^

This is what I see when I type in libname os list;.

Note, this is just after I open EG prior to running anything and my attempt to create the OS library in DI Studio has been removed.  There is no code run when the project is open.  I definitely did not define that to be OS.

twocanbazza
Quartz | Level 8

Hi John.

I see the same sort of thing... trying to look for some documentation on this.

I however, I could assign in SMC and DIS (4.21) and register datasets there....

Running DIS and SMC on Windows 7 (non 64) and Workspace etc on windows 2000 (64b)...

Have you got all the latest hotfixes installed?

Barry

JohnT
Quartz | Level 8

Hi Barry,

We had someone from SAS install everything for us.

I assume that all the latest hotfixes were installed.

It looks as though this is related to the Windows Environment Variables.

There is an OS entry.  If I change it to OS1 for example, I can do everything as expected.

My only problem is that IT here don't want me to make that change, as it's possible that this variable is used by them, for example appling patches.

The work-around that I'm using is to assign the library in appserver_autoexec_usermods.sas such that everytime EG and DI Studio start it's defined.

To have it show up in EG, I had to uncheck the pre-assign box.

Tom
Super User Tom
Super User

SAS has a "feature" that it will use the value of an environment variable as the path for a libref without the user needing to code a LIBNAME statement.

OS is a standard Windows_NT environment variable so you will see the same result for LIBNAME OS LIST statement on any version of SAS running on Windows NT.

This feature I assume dates back to SAS's roots in the IBM mainframe environment where a DD line in JCL was required to make the assignment between a DDNAME and a physical file location.

The real question is why would DI studio be using environment variables for DI defined libraries rather than just executing a LIBNAME statement or function call?

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1003 views
  • 3 likes
  • 3 in conversation