I am getting error while calling UtilityRunJob from a routin

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
RaviM
Participant
Posts: 12
Joined: Thu Aug 19, 2004 4:13 pm

I am getting error while calling UtilityRunJob from a routin

Post by RaviM »

Hi All,

I am getting error while UtilityRunJob from user defiend routine. below is my code.
------------------------------------------------
$INCLUDE DSINCLUDE JOBCONTROL.H
Arg1 = "TestJob"
Str = UtilityRunJob(Arg1,"","","")
Ans = Str
----------------------------------------------

Error message :
Compiling: Source = 'DSU_BP/DSU.TestRoutine', Object = 'DSU_BP.O/DSU.TestRoutine'

0003 Str = UtilityRunJob(Arg1,"","","")

^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
Array 'UtilityRunJob' never dimensioned.

2 Errors detected, No Object Code Produced.

How do i solve this error
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Did you try to test the routine before even running it. The test should have what all arguments to pass in order to see the result of the job.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
RaviM
Participant
Posts: 12
Joined: Thu Aug 19, 2004 4:13 pm

Post by RaviM »

Yes,

This UtilityRunJob working fine when i am calling from server job.
giving error only when i am calling from user defind routine.

DSguru2B wrote:Did you try to test the routine before even running it. The test should have what all arguments to pass in order to see the result of the job.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You are calling a Transform from within a routine. As far as i know, i dont think you can do that. I might be wrong but i am pretty sure you cannot call a Transform from within a routine
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Moreover why are you doing your own user defined routine. Simple call that routine from the Transformer and just pass in the required arguments.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

What about the following... the original error is an indication it can't find the UtilityRunJob routine

Code: Select all

Deffun UtilityRunJob(Name, PA, R,W) Calling "DSX.UTILITYRUNJOB"

Arg1 = "TestJob"
Str = UtilityRunJob(Arg1,"","","")
Ans = Str 
Ogmios
Last edited by ogmios on Sat Apr 15, 2006 3:00 pm, edited 1 time in total.
In theory there's no difference between theory and practice. In practice there is.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

UtilityRunJob is not cataloged with a "DSU" prefix. From memory it's cataloged as "DSX.UTILITYRUNJOB". Someone with access to DataStage could perhaps verify this. That's the name that must be used in the CALLING clause. And note that it is case sensitive (all upper case).
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 »

ray.wurlod wrote:From memory it's cataloged as "DSX.UTILITYRUNJOB"
Sounds right to me.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply