INVOCATION ID's

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ravindrag
Participant
Posts: 40
Joined: Wed Dec 14, 2005 3:22 am

INVOCATION ID's

Post by ravindrag »

HI

How to get all the INVOCATION ID's for a Multi instance Job (Generic) in the project level.

I am using below server routine to extract the Job run end time stamp.

$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle=DSAttachJob(JobName,DSJ.ERRNONE)
If JobHandle <> 0 Then
LatestFinish = DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP)
If LatestFinish=-1 Then LatestFinish=""
Ans = JobName : "," : LatestFinish
ErrorCode=DSDetachJob(JobHandle)
End
Else
Ans = ""
End

I have to concatenate the Invocation id with the Job name to get the Job run end time stamp for all multiple instance jobs. Please provide an idea on how to get the invocation ID's for multiple instance jobs.
Last edited by ravindrag on Wed May 26, 2010 5:38 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSGetJobInfo(hJob, DSJ.JOBINVOCATIONID) should do it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ravindrag
Participant
Posts: 40
Joined: Wed Dec 14, 2005 3:22 am

INCATION_IDS

Post by ravindrag »

My job design:

Using Unverse stage executing the below command to extract jobnames, categories existing in the project.

"SELECT NAME, CATEGORY FROM DS_JOBS ORDER BY CATEGORY;

After extracting the all the job names in the project pass to below basic routine to extract the end time stamp.

$INCLUDE DSINCLUDE JOBCONTROL.H
JobHandle=DSAttachJob(JobName,DSJ.ERRNONE)
If JobHandle <> 0 Then
LatestFinish = DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP)
If LatestFinish=-1 Then LatestFinish=""
Ans = JobName : "," : LatestFinish
ErrorCode=DSDetachJob(JobHandle)
End
Else
Ans = ""
End

Issue is I am unable to extract the run job end time stamp for jobs run with invocation IDs.

Question: How to pass the job name and invocation ID s to above routine. Please advice me on approach of this requirement.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

For Multi-Instance jobs, the JobName would be the base job name, followed by a dot and the Invocation ID. Then get a handle for that.
-craig

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