Getting invocation Id details from the job

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
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Getting invocation Id details from the job

Post by ssunda6 »

Hi,

Using a unix script Iam trying to capture logs of job/sequences and storing them to oracle table.

I have a sequence "A", which has jobs "a" and "b".
"a" is multiple instance job with around 10 instances. And in this particular sequence I am running only 1 particular instance of it(say 'a.one')

I have to store logs of both sequence and also jobs involved in it. I am able to get the job names of the sequence. Here since "a" is multi instance, the log to be captured is "a.one" only.

How do I get the name of instance Id("one") used in this particular sequence?

Thanks,
ssunda.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

From the job sequence's log, for example from the "job run requested" event.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Post by ssunda6 »

Thanks Ray.

Cant we get this information using some "dsjob" command?
In a routine, we can use "DSGetJobInfo(jobhandle,DSJ.JOBINVOCATONID)" to get the invocation id of the specified job. Likewise, any command that we can use in unix?

Thanks,
ssunda.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not from dsjob (apart from reading the log). There is a C language API (dscapi) that is effectively the same as the BASIC API (dsapi) - you can use the functions in that. This is the API that dsjob uses.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ssunda6
Participant
Posts: 91
Joined: Tue Sep 19, 2006 9:32 pm

Post by ssunda6 »

Thanks Ray for that information. I will try to use API functions and will get back if any doubts.
Post Reply