Sharing Secured Routines between projects

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
justlrng
Participant
Posts: 30
Joined: Thu Oct 16, 2003 1:17 pm

Sharing Secured Routines between projects

Post by justlrng »

Hi,

I have a routine that has been secured, so no one can read the source code, associated with a particular project. Is there a way to share this routine with different projects without having to recreate the routine within each project I want to use it in?
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you cataloged the way Ray said then you need to add COMPLETE.

CATALOG MYBP MYPROGRAM LOCAL COMPLETE

This will create a VOC entry which you can copy to other projects. If you have a record in the VOC like:

Q
ProjectName
VOC

Then you can copy from the local VOC to this q-pointer to the other projects. As long as you do not move your projects then these CATALOG entries will work in any project.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Another mechanism is "global catalog".

Here you use a leading asterisk in the name:

Code: Select all

CATALOG DSU_BP *SecureRoutine 
In all projects that have to access this, you no longer choose transform function as the routine type. Instead, you choose "custom UniVerse function".

Find CATALOG in the DataStage BASIC manual.
Find "custom UniVerse function" in on-line help from Manager or Designer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
justlrng
Participant
Posts: 30
Joined: Thu Oct 16, 2003 1:17 pm

Post by justlrng »

Well, I've tried both suggestions but I get the same error messages after I've tried to create the universe function in another project. I messages I get are:

Program "TSTConvertASN.B": Line 4, Unable to open the operating system file "DSU_BP.O/CONVERTASN".
[ENOENT] No such file or directory
Program "TSTConvertASN.B": Line 4, Unable to load file "CONVERTASN".
Program "TSTConvertASN.B": Line 4, Unable to load subroutine.

Could it be a permissions problem?

Thanks to both of you for your help :)
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you are creating a function then the first line needs to have function definition. Next you need

Code: Select all

DEFFUN DSWaitForJobList(Arg1,Arg2,Arg3) CALLING "DSU.DSWaitForJobList"
in the routine calling yours. You need a routine which routes to your hidden routine. Ray was trying to explain what is called global cataloged programs. I use what are Pick style catalogs. I am more comfortable with those. They do not get deleted when you upgrade DataStage. Both methods will work fine.

Try it now.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If it's globally cataloged you need the asterisk in the DEFFUN declaration. For example

Code: Select all

DEFFUN SecureRoutine(Arg1,Arg2) CALLING "*SecureRoutine"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
justlrng
Participant
Posts: 30
Joined: Thu Oct 16, 2003 1:17 pm

Post by justlrng »

ray.wurlod wrote:If it's globally cataloged you need the asterisk in the DEFFUN declaration. For example

Code: Select all

DEFFUN SecureRoutine(Arg1,Arg2) CALLING "*SecureRoutine"
I finally got it to work. Yeah :D

Thanks to both of you again. I couldn't have done it without your help and I learned a lot in the process. Thank you.
Post Reply