Invocation ID question

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
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Invocation ID question

Post by HSBCdev »

I've got a multi-instance job which will be called by many different job sequences. Do I have to make sure that the invocation id used in each job in each sequence is unique or can DataStage handle two different sequences calling a job with the same invocation id?

What do people normally do for invocation id? Do you put the sequence name as part of it so that you know it will be unique?

Thanks for your help.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

The invocation ID has to be unique for your multi-instance job to run concurrently for the different calling sequences.

Mike
sonia jacob
Participant
Posts: 122
Joined: Mon Jul 05, 2004 1:33 pm
Location: MA

Post by sonia jacob »

I used something like the Routine given below to set invocation ids to job.

********************************************
Cnt = 1

Loop Start

If Jobname.Cnt is running then
Increment Cnt;
Continue Loop;
Else
Exit Loop;
End if

End loop

Run JobName.Cnt
********************************************

you could put your code together with the help of DSAttachJob, DSGetJobInfo, DSJS.RUNNING, DSDetachJob
leomauer
Premium Member
Premium Member
Posts: 100
Joined: Mon Nov 03, 2003 1:33 pm

Post by leomauer »

If you run it manually you will set Invocation ID. If you run it using dsjob then you can use PID ($$) for it.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I try and use a descriptive invocation id so when I go to the Director to view the logs I know which one to look at. It I have multiple instances for a partitioned load the instance id describes each partitions, eg. 1to10000, 100001to20000, 200001to300000. If it is a generic job used by different sequence job the id describes which sequence job it came from, so your idea of using the sequence job name is a good one.
HSBCdev
Premium Member
Premium Member
Posts: 141
Joined: Tue Mar 16, 2004 8:22 am
Location: HSBC - UK and India
Contact:

Post by HSBCdev »

Thanks all for your advice
Post Reply