How to nest custom routines

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
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

How to nest custom routines

Post by MrBlack »

How do you reference a custom routine within another custom routine?

test2

Code: Select all

Ans = 2
test1

Code: Select all

Ans = 1
Ans = test2()
I would expect the result to be '2' but I get a:

Code: Select all

Array 'test2' never dimensioned.
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Post by MrBlack »

Found the answer:

viewtopic.php?t=91285&sid=b6ac784102376 ... 914e68fb5d

So the code for test1 looks like this:

Code: Select all

deffun test2(Arg1) calling "DSU.test2" 

Ans = test2(0)
Post Reply