Page 1 of 1

Passing values to a job through sequencer

Posted: Sun Oct 23, 2011 11:37 pm
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

Posted: Sun Oct 23, 2011 11:42 pm
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.

Posted: Mon Oct 24, 2011 12:28 am
by pandeesh
Another simple way is using After job subroutine to insert the values to the table using sqlplus

Posted: Mon Oct 24, 2011 7:00 am
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.