Your SAS programs, embedded in web apps and elsewhere

How to keep libname-ID in promoted Stored Process?

Reply
Occasional Contributor
Posts: 10

How to keep libname-ID in promoted Stored Process?

Hi,

I have made a stored process within an Enterprise Guide project. This project exists of a couple of program-entries.
In the Metadata we have declared a library. In EG we use the meta-table-objects to link to the program-entries, so if we create a stored process the LIB-ID will be stored within the stored process.
This works.

Now we want to promote the stored process to another environment (production-server). In this environment the same library is also declared via the Metadata, but with a different LIB-ID.
We have promoted the stored process via the Management Console: export in the development-environment and import in the production-environment.
What we see, is that the LIB-ID, after import, is still the same as from the development-environment. So, this will not work on the new environment.

What can we do, besides manually change the ID in the stp-program, to make this change automatically?
SAS Super FREQ
Posts: 306

Re: How to keep libname-ID in promoted Stored Process?

Why are you using LIBID? Can you use the library name instead?

Vince DelGobbo
SAS R&D
Occasional Contributor
Posts: 10

Re: How to keep libname-ID in promoted Stored Process?

Posted in reply to Vince_SAS
Maybe i have to explain a bit more. And sorry, the Subject-text is not quit right! It should be: "How to keep libname in promoted Stored Process?".

In the programs I use the library-name to use the sas-datasets. That will be obvious, I think.
In the project, from which I will create a Stored Process, I add the meta-objects for the sas-datasets.
By generating the Stored Process from the collection of program-entries and meta-table-objects, SAS will add the libname and libid to the Stored Process-sascode.
Example:
Libname B6RPAR META libid=A5Z3O213.AZ00002O;

If we promote this Stored Process to another level (from Dev to Test or Prod), where also this same library is allocated, the stored process will not execute. The reason is, the allocated library has a different LIBID.
So, what can we do to make the Stored Process work properly?
SAS Employee
Posts: 11

Re: How to keep libname-ID in promoted Stored Process?

Hi,

Instead of using the libid to find the library in Metadata, try using the libref defined in Metadata instead.

Libname B6RPAR META library='B6RPAR';

So, assuming your library names are consistent between Dev/Test/Prod, this should work after promotion.

Cheers.
Occasional Contributor
Posts: 10

Re: How to keep libname-ID in promoted Stored Process?

Thanks,

It works.
Ask a Question
Discussion stats
  • 4 replies
  • 296 views
  • 0 likes
  • 3 in conversation