Changing the behaviour of Stopped Jobs & After-job routi

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't believe so. :?

I'm wondering... why run another job from 'after-job'? That's not something I've ever considered doing and am wondering why you would have set things up like that. If you don't mind.
-craig

"You can never have too many knives" -- Logan Nine Fingers
katz
Charter Member
Charter Member
Posts: 52
Joined: Thu Jan 20, 2005 8:13 am

Post by katz »

Hi Craig,

The After-job routine captures audit information regarding the server job it is called from. The following information is extracted in the routine:

Job
JOB_NAME
JOB_DESCRIPTION
JOB_STATUS
JOB_WAVE_NO
JOB_START_DT
JOB_END_DT
JOB_ELAPSED_SECS
JOB_BATCH_NO
JOB_VERSION_NO
JOB_PID


Parameters
PARAM_NAME
PARAM_VALUE


Stage
STAGE_NAME
STAGE_DESCRIPTION
STAGE_TYPE
STAGE_STATUS
STAGE_START_DT
STAGE_END_DT
STAGE_ELAPSED_SECS
STAGE_PID
STAGE_CPU_TIME


Link
STAGE_NAME
LINK_NAME
LINK_TYPE
LINK_DESCRIPTION
LINK_TARGET
LINK_ROW_COUNT


The rows across the tables are joined by a surrogate key.

Once the audit data is extracted, the routine writes it to a sequential file and then it calls a server job to insert the data form the sequential file into database (oracle) tables.

This information (along with the job log and job report which are also captured) has proved very useful in diagnostic and performance measurement activities. But when a job is stopped, the job called from within the After-job routine - which loads the rows into the database tables - doesn't complete (it gets stopped to) and I lose the resulting audit data. I would, of course, perfer to not lose the data.

katz
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It is not possible to prevent the stop request from being cascaded.

However status information is recorded in the Repository, and can be retrieved even after the job has finished - irrespective of its status.

Therefore your job that collects the statistics could be rewritten to run independently (probably passing the job name as a job parameter), and run from a job sequence or manually as needed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I think if you call up the after-job job using the command line 'dsjob' instead of the accepted DS/BASIC set of routines you will be successful.
katz
Charter Member
Charter Member
Posts: 52
Joined: Thu Jan 20, 2005 8:13 am

Post by katz »

Hi ArndW,

This is an approach worth investigating. Thank you for sharing this good idea. I will do some testing and let you know I get on.

katz
katz
Charter Member
Charter Member
Posts: 52
Joined: Thu Jan 20, 2005 8:13 am

Post by katz »

The above technique works a treat! Thanks again ArndW for your suggestion.

katz
Post Reply