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

Error Libref is not assigned

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

Error Libref is not assigned

Hi,

I have created a libref in one of the job and tried to access that from another job in the DI studio but it showing the following error.

ERROR: Libref is not assigned.

Please let me know how to resolve this issue at the earliest.

Regards,

Siva


Accepted Solutions
Solution
‎06-20-2015 08:42 AM
SAS Super FREQ
Posts: 8,742

Re: Error Libref is not assigned

Hi, if you need the LIBNAME statement to be "globally" assigned, either think about putting your LIBNAME statements into either an AUTOEXEC file on the server -- that will be invoked every time SAS starts up. OR, have each of your jobs use a %INCLUDE to include the file with your LIBNAME statements so you know it is available before the rest of your code runs. If these are metadata libraries and you want the security of the BI Platform, then use the META form of the LIBNAME statement (your libraries and tables will need to be registered in the metadata for you to use the META engine).

cynthia

View solution in original post


All Replies
Community Manager
Posts: 2,757

Re: Error Libref is not assigned

You haven't provided a lot of details, but it's possible that you have an error in the LIBNAME assignment.  You don't always see the error right away -- not until you go to USE the library in subsequent code.

Check the details of your libref assignment where you created it, and perhaps add some code to test access immediately.  Then see if it works in your other job.

Chris

Occasional Contributor
Posts: 19

Re: Error Libref is not assigned

Hi Chris,

Thanks for the information. I have checked my libname assignment and it is working fine. I need the libname assignment to be globally declared, so that it can be used by all other following DI jobs in the flow.

Regards,

Siva

Solution
‎06-20-2015 08:42 AM
SAS Super FREQ
Posts: 8,742

Re: Error Libref is not assigned

Hi, if you need the LIBNAME statement to be "globally" assigned, either think about putting your LIBNAME statements into either an AUTOEXEC file on the server -- that will be invoked every time SAS starts up. OR, have each of your jobs use a %INCLUDE to include the file with your LIBNAME statements so you know it is available before the rest of your code runs. If these are metadata libraries and you want the security of the BI Platform, then use the META form of the LIBNAME statement (your libraries and tables will need to be registered in the metadata for you to use the META engine).

cynthia

Occasional Contributor
Posts: 19

Re: Error Libref is not assigned

Hi Cynthia,

Thanks for the information. I made the libname globally by adding into AUTOEXEC file on the server.

Regards,

Siva

Respected Advisor
Posts: 3,887

Re: Error Libref is not assigned

Having this definition in the autoexec instead of metadata will work but is especially for use in DI Studio certainly not best practice. It should be defined in SAS Metadata.

Respected Advisor
Posts: 3,887

Re: Error Libref is not assigned

With DI Studio being metadata driven I'd say "best practice" would be to define everything in metadata - the library as well as the tables used in any of the DI jobs.

Occasional Contributor
Posts: 19

Re: Error Libref is not assigned

hi Patrick,

Thanks for your feedback.

Regards,

Siva

Super User
Posts: 3,102

Re: Error Libref is not assigned

DI Studio is very much a metadata-driven product, so it would be sensible to define all commonly-used data libraries required by DI Studio in metadata. These libraries may useful in other SAS tools as well like EG and SAS Studio.

Regular Learner
Posts: 1

Re: Error Libref is not assigned

Hi Silva,

when you create a new libname never forget to assign the server , No Way, Library Properties, Assign and choose the current server

Maicfelps
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 14644 views
  • 5 likes
  • 6 in conversation