dsjob -ljobs with invocation id

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
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

dsjob -ljobs with invocation id

Post by JPalatianos »

Hi,
I am trying to produce reports on job statuses on our various project and was wondering how I can also get the invocation id in the report.

I run the following as a test:
dsjob.exe -domain NJROS1A2495:9080 -user ##### -password ###### -server NJROS1A2495 -ljobs -status 3/2/96/97 EDW

I do get a list of jobs but without an invocation ID.

Thanks - - John
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

If you are using operations console, then required information is available in DSODB database:

Code: Select all

SELECT H.HostName, X.ProjectName, X.JobName, R.InvocationId, JT.JobTypeName, RT.RunTypeName, SR.MinorStatusName,
       R.RunStartTimestamp, R.RunEndTimestamp
  FROM  DSODB.JOBRUN R, DSODB.JOBEXEC X, DSODB.HOST H, DSODB.JOBTYPEREF JT
      , DSODB.RUNTYPEREF RT, DSODB.RUNMINORSTATUSREF SR 
 WHERE R.RunMajorStatus = 'FIN'
   AND R.JOBID = X.JOBID
   AND X.HOSTID = H.HOSTID
   AND X.JobType = JT.JobTypeCode
   AND R.RunType = RT.RunTypeCode
   AND R.RunMinorStatus = SR.MinorStatusCode
-- AND R.RunEndTimestamp > SYSDATE - 1/48
-- AND X.ProjectName = <Your_Project_Name>
 ORDER BY R.RunStartTimestamp ;
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thank You but we do not have the operations console installed here.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can do it in a DataStage routine. There is a property to tell if a job is multiple instance. There is a call to ask for all the instance ids. Do a search. I think this solution has been posted.
Mamu Kim
Post Reply