I need to populate job start date_time (YYYY-MM-DD HH24:MM:SS, but not micro secs) to one of my oracle table field (of Oracle Date data type).
We may use DS macros DSJobStartDate:" ": DSJobStartTime
Or we can substring Macro DSJobStartTimestamp to pick date_time.
My question is which the best/efficient way to do this and reason for it.
I appreciate for your response
Thanks
Satish
Best way to populate jobstart datetime to Oracle -DS Macro
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 123
- Joined: Wed May 18, 2005 7:41 am
- Location: USA
-
- Participant
- Posts: 123
- Joined: Wed May 18, 2005 7:41 am
- Location: USA
The date and time the job started doesn't change, so use the Initial Value of the stage variable to capture it once instead of on each row. The blank derivation of the stage variable means it retains its value over the course of the job. Then you just simply reference this value for each row going into Oracle.
Fast.![Wink :wink:](./images/smilies/icon_wink.gif)
Fast.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Rather than the separate macros, why not use for stage variable initialization
(There may even be a DSJobStartTimeStamp macro - I don't have access to DataStage right now.)
Code: Select all
DSGetJobInfo(DSJ.ME, DSJ.JOBSTARTTIMESTAMP)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.