Updating DB2 stage with system date

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
Green_Dolphins
Participant
Posts: 1
Joined: Wed Oct 19, 2005 4:55 am

Updating DB2 stage with system date

Post by Green_Dolphins »

Hi,

I am having a stage variable into which i am populating the Dsstart date. Now this date i have to basically write to a DB2 table having a field called Date. I am using a DB2 API stage and would like to understand what user defined query shall i write.
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

The easiest solution is to let the DB2 stage generate the SQL. You just provide the connectivity/authorization information, the table name and the column name(s), deliver the values into those columns within your job design, and whether you want to insert, update or some combination thereof.
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 »

Keep in mind that the DB2 stage will want dates in internal format from what I recall.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If that's the case, apply an Iconv() function in the stage variable derivation.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply