Select DS_JOBS not finding multiple instances

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
mointampa
Participant
Posts: 2
Joined: Mon Sep 06, 2004 8:57 pm

Select DS_JOBS not finding multiple instances

Post by mointampa »

Hi All
I have written a job to reset all the jobs/sequences within the current project.

To get the list of all the server jobs and not select the mainframe jobs I am using:
SSELECT DS_JOBS WITH NAME LIKE 1A0X AND JOBTYPE <> 1

which seems to work well, except that it will ignore multiple instances of the same job.

For example JOB001 will reset but JOB001.DEV, JOB001.TST will stay in their aborted state.

Does anyone know of a way to modify the above query to retrieve all server jobs including all the instances of multiple instance jobs?
Thanks in advance.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Just mass-compile the base jobs, all the instances will disappear. Upon next call for execution, the invocation id will not be found and the instance will be automatically created.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
mointampa
Participant
Posts: 2
Joined: Mon Sep 06, 2004 8:57 pm

Re: Select DS_JOBS not finding multiple instances

Post by mointampa »

mass compile is not really an option as this has to run at the start of the day automatically on a testing server that does not have the client installed. Is there another way to clear the multiple instances using a server job?
Thanks
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Jobs are stored in DS_JOBS. It's the table that maps job names to job numbers. It does not record instances. Being capable of running in multiple instances is a property of the job; the individual instances are not separate jobs. Instances are run-time, not design-time, properties, and so are stored in the run-time tables (primarily RT_STATUSnnn and RT_LOGnnn).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You will not be able to select these in the same select statement. You can call a routine to get the instance ids. There are several posts on this. You might want to search for them. There are also posts on dictionary items and routines on which job is a multiple instance job. Ray posted a routine long time ago.
Mamu Kim
Post Reply