Page 1 of 1

Querying the log of a multi-instance job

Posted: Mon Nov 18, 2019 1:47 pm
by abc123
I would like to query the log of a multi-instance job. I would like to see if any of the instances ever encountered a warning. I thought of querying RT_STATUSnnn files in the project but I am not sure how to do it. Any ideas? Is there any other way that this can be done?

Posted: Tue Nov 19, 2019 5:49 am
by chulett
Well... lots of discussions here but it can be a bit of a pain to wade through them looking for the bits you are interested in.

There are basically two places you can access the job information via the API: your server's command line or the BASIC routine API. Both have the same set of functions. Both the command line interface and BASIC API are fully documented, or at least they were and I assume they still are. From the command line you would use the "dsjob" utility, the same one that amongst other things can start/monitor/stop jobs. Then there are all of the various "DSGetJob***" options you can call in a custom BASIC routine and leverage in a Sequence or Server job.

For the previous discussions, I'd suggest an exact search here for "multi-instance" and/or "dsgetjob". Shouldn't really matter how old they are as this is core functionality that has not changed. Keep in mind the fact the multi-instance job invocations are all stored in the same log, identified by their InvocationID. The Director can make them look like they are stored separately, but it is basically using a "view" in the table to filter each one.

Posted: Tue Nov 19, 2019 4:01 pm
by abc123
Thanks. I tried:
dsjob -domain MyDomain -user MyID -password MyPwd -server MyServer -logdetail MyProj MyJob.InstanceID

I get the error:
ERROR: ASBHome not found
no JvmPath configured

Posted: Tue Nov 19, 2019 8:14 pm
by chulett
As what user? Don't know what "ABSHOME" is but if it is Java based, from the error it would seem that $JAVA_HOME may not be set. Are you running this with the proper user with the proper / full set of expected environment variables set?

Others will need to provide specific guidance, sorry but after all these years I'm only good for the general stuffs. :wink:

Posted: Sun Nov 24, 2019 8:05 am
by PaulVL
Did you source your dsenv settings?


$DSHOME/bin/dsjob -logdetail proj jobname.invocation

Posted: Sun Nov 24, 2019 9:23 am
by battaliou
Easy way to do it is to create a SERVER job with a HASHED file stage feeding an output link. Set the filename to RT_LOGnn and then go VIEW-DATA. You may have to setup a few column names, one being defined as a key.

Posted: Tue Dec 03, 2019 4:15 pm
by ray.wurlod
Logs are also accessible from the DataStage Operations database (DSODB). This is fully documented in the IBM Knowledge Center, with example queries. Since InvocationID is a column in the JobExec table, it is easy to filter for a particular query, or to group by InvocationID.