Passing values to a job through sequencer

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
phanikumar
Participant
Posts: 60
Joined: Tue Sep 20, 2011 10:44 pm
Location: INDIA

Passing values to a job through sequencer

Post by phanikumar »

I have a scenario where i am running a job through sequencer and when the job is being completed it should record the current date and time in the job in two separate columns which are already pre defined.Any ideas or suggestions would be really appreciated.

Regards

Kumar
prakashdasika
Premium Member
Premium Member
Posts: 72
Joined: Mon Jul 06, 2009 9:34 pm
Location: Sydney

Post by prakashdasika »

At the end of sequence , Run a job through a job activity . In the job load the table through a database stage and pass the data and time values through a transformer (before the database stage) by calling the appropriate functions.
Prakash Dasika
ETL Consultant
Sydney
Australia
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Another simple way is using After job subroutine to insert the values to the table using sqlplus
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Simple, perhaps, but problematic. Any issues with that approach and you'll be correcting it manually.

You can easily add this "end timestamp capture" function capability into any job that needs it using a Aggregator to ensure that happens last. I'm assuming, however, that you may need to do this for more than a single job. If that's the case, you can build a generic job that gets the end time of any job and populates your table... much like prakashdasika suggested. The "appropriate function" would be DSGetJobInfo() with the DSJ.JOBLASTTIMESTAMP InfoType. Yes, that means you'll need to write a routine and call it from the job to do this, so keep it simple and make it a Server job.
-craig

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