Div (Mod) function usage in DataStage job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sharkbait1211
Participant
Posts: 2
Joined: Thu Oct 28, 2010 6:58 am

Div (Mod) function usage in DataStage job

Post by sharkbait1211 »

Hi all :)

I am creating a server job and have encountered the below error message when debugging:

[IBM][CLI Driver][DB2/NT] SQL0440N No authorized routine named "DIV" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884

Here is the piece of code for the SQL statement using DIV function:

SELECT ...
FROM ...

WHERE PERIOD > ( ( DIV(#p_PERIOD# , 100) - 1) * 100 + MOD(#p_PERIOD# , 100) )

(p_PERIOD is declared as one of the parameters in Job properties)

Any ideas and/or instructions to previous related posts would be very much appreciated!

Many thanks,

SB
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sounds like Div() isn't valid for your database or the data types are wrong. Why not just use the normal "/" operator?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sharkbait1211
Participant
Posts: 2
Joined: Thu Oct 28, 2010 6:58 am

Post by sharkbait1211 »

chulett wrote:Sounds like Div() isn't valid for your database or the data types are wrong. Why not just use the normal "/" operator?

thanks craig (chulett) for your response
the data type is correct, but you may be right as I've tried to run the query in Toad and it seems Div() is not valid with our DB2. I will need to check it again later. Now I will try some alternatives to make the DS job work first

Thanks again for ur help!

SB

Post Reply