Page 1 of 1

dsjob -ljobs with invocation id

Posted: Fri Feb 05, 2016 11:50 am
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

Posted: Fri Feb 05, 2016 5:10 pm
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 ;

Posted: Fri Feb 05, 2016 6:00 pm
by JPalatianos
Thank You but we do not have the operations console installed here.

Posted: Sat Feb 06, 2016 11:28 am
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.