calling transform from within routine

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
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

calling transform from within routine

Post by denzilsyb »

again! i am in need of assistance.

We want to call a sdk_transform from within a user defined routine AND want to use the value returned from the transform within the routine.

i.e.

Code: Select all

 Call DataTypePicComp3( col1 )

from the above, we want to use the value returned in the rest of the routine.
dnzl
"what the thinker thinks, the prover proves" - Robert Anton Wilson
phanee_k
Charter Member
Charter Member
Posts: 68
Joined: Thu Nov 20, 2003 11:02 pm

Post by phanee_k »

Hi,
Its not a good practice for calling the Transform in a routine .
Instead you can call the routine with in the routine.

Declare the DataTypePicComp3 routine ( since the tranform is calling this routine in the transform) using the "Deffun" statement and call the routine

Var = DataTypepicComp3(Arg)

and use "Var" variable further in your routine.

HTH,

Cheers
Phani
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Basically it's not possible to call a Transform from a Routine.

You can, of course, copy the Transform's derivation expression into your Routine, but then you incur the need to maintain it in two places.

In your example, I think it's a pretty safe bet that PIC COMP3 isn't going to change any time soon!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

Post by denzilsyb »

we actually had trouble calling the sdk transform - simply because we didnt know the syntax.

So, from reading here and there we eventually found that by saving the transform to examples/functions we could call it using: DSU.CopyOfTransformNowInExamplesFunctions

What is DSU? How could I avoid using DSU and point directly to the original transform?
dnzl
"what the thinker thinks, the prover proves" - Robert Anton Wilson
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
DSX is for routine that support supplied Transforms, while DSU is for user-written (that is, written and third-party providers, not by Ascential).

Ketfos
Post Reply