Page 1 of 1

calling transform from within routine

Posted: Tue Aug 03, 2004 2:57 am
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.

Posted: Tue Aug 03, 2004 3:47 am
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

Posted: Tue Aug 03, 2004 6:16 am
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!

Posted: Tue Aug 03, 2004 6:29 am
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?

Posted: Tue Aug 03, 2004 4:22 pm
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