Your SAS programs, embedded in web apps and elsewhere

Error Libref is not assigned for dymanic prompt

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 16
Accepted Solution

Error Libref is not assigned for dymanic prompt

Hello,

I have a stored process with a dynamic prompt created from a file in LIB BG3X00.

Process works great in Enterprise Guide.

When deployed to the portal, however, I get an error message LIBREF not assigned. (see attachments)

I have the libname explicitly in my stored process but I think the prompts are executing BEFORE the libname statement.

If I'm right, how do I correct?

thanks!


Capture2.JPGCapture.JPG

Accepted Solutions
Solution
‎02-24-2017 08:21 AM
Occasional Contributor
Posts: 16

Re: Error Libref is not assigned for dymanic prompt

A huge amount of gratitude is coming your way....this was the perfect solution and you saved a critical project which is due TODAY...thank you so much...

View solution in original post


All Replies
Respected Advisor
Posts: 3,124

Re: Error Libref is not assigned for dymanic prompt

You are right, Prompts, in base SAS term, are macro/macro variables. They get to execute long before the SAS code is compiled. The easiest way to tackle it is to 'pre-assign' those metadata libraries. Ask your SAS admin or check Docs if you have permission to do it.
Occasional Contributor
Posts: 16

Re: Error Libref is not assigned for dymanic prompt

Thank you for your fast response.

The library is preassigned (See attachment)

We also tried to change the pre assignment type to by metadata engine...same result.

 

I would appreciate any other suggestions....

thanks!


Capture3.JPG
Regular Contributor
Posts: 170

Re: Error Libref is not assigned for dymanic prompt

I had a similar problem for stored processes that are spawning using the Stored Process Server under the SAS General Servers account (instead of Workspace Servers under user's ID).  If I recall correctly, I had to 1) make sure the SAS General Servers account had permissions on the library and 2) restart Object Spawners.

Super User
Posts: 6,941

Re: Error Libref is not assigned for dymanic prompt

To further elaborate on @Timmy2383:

The SAS General Servers is not a user account in SAS metadata, it is a group account. But it is connected to the operating system user account sassrv, which is used to run pooled servers (that includes the STP server).

So you have to make sure that SAS General Servers as a group has Authorization for the library in SAS metadata, and that sassrv as a user has the necessary operating system permissions (read and execute) on the directory and its contents.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎02-24-2017 08:21 AM
Occasional Contributor
Posts: 16

Re: Error Libref is not assigned for dymanic prompt

A huge amount of gratitude is coming your way....this was the perfect solution and you saved a critical project which is due TODAY...thank you so much...

Regular Contributor
Posts: 170

Re: Error Libref is not assigned for dymanic prompt

Our pleasure! Thanks to @KurtBremser for giving proper clarification and elaboration of my hasty reply.
Occasional Contributor
Posts: 6

Re: Error Libref is not assigned for dymanic prompt

Hi! I suspect I'm having the same issue. What are the permissions required for the SAS General Servers group on the library and members?

 

I gave that group ReadMetadata and Read to both library and member, restarted the object spawner (on SASApp WS Server) and nothing changed.

 

Are things different for an DBMS library?

Occasional Contributor
Posts: 6

Re: Error Libref is not assigned for dymanic prompt

Just dawned on me that the SAS General Servers group was not a member of the group with the Oracle account defined...

 

I even removed the explicit permissions to the library and table in metadata and it works after restarting the ObjectSpawner.

 

Thanks for the help here!

☑ This topic is SOLVED.

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

Discussion stats
  • 8 replies
  • 609 views
  • 6 likes
  • 5 in conversation