Common routine among 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You have to 'duplicate the code'. Treat one project as the 'master' project and promote the common routine everywhere else (read only) that it needs to be used.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can acually "globally catalog" the routine.

But this involves a number of steps and will not be supported by IBM, so any maintenance issues will be your own.

Essentially the steps are as follows:
  • copy the source code into a Type 19 file (create one if you don't have one - CREATE.FILE DSU_BP 19 will suffice as a command) including the FUNCTION or SUBROUTINE definition, the RETURN function/statement and a terminating END statement

    compile (for example BASIC DSU_BP MyRoutine)

    catalog using a name that begins with an asterisk (for example CATALOG DSU_BP *MyRoutine)

    call or declare your routine with the asterisk prefix (for example DEFFUN MyRoutine(Arg1, Arg2) CALLING "*MyRoutine")
These steps are all disclosed in the DataStage BASIC manual.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

True, but us mere mortals duplicate the code. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It has since occurred to me that, because it's in IBM's manual, they would have to support it.

And it IS used in the product itself. Any job sequence will have calls to *DSR*Message, for example.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gpbarsky
Participant
Posts: 160
Joined: Tue May 06, 2003 8:20 pm
Location: Argentina

Post by gpbarsky »

Thank you, but I couldn't see Ray's complete answer.

Anyway, I'll duplicate the code. This is only transporting of one component.

Have a good week.
Guillermo P. Barsky
Buenos Aires - Argentina
Post Reply