SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Creating the LIBNAME OS

Reply
Frequent Contributor
Posts: 75

Creating the LIBNAME OS

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

Super Contributor
Posts: 356

Creating the LIBNAME OS

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

Barry

Frequent Contributor
Posts: 75

Re: Creating the LIBNAME OS

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.

Super Contributor
Posts: 356

Re: Creating the LIBNAME OS

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

Frequent Contributor
Posts: 75

Creating the LIBNAME OS

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.

Super User
Super User
Posts: 6,502

Creating the LIBNAME OS

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?

Ask a Question
Discussion stats
  • 5 replies
  • 293 views
  • 3 likes
  • 3 in conversation