Hw to get JobHandle for any job other than current 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
srekant
Premium Member
Premium Member
Posts: 85
Joined: Wed Jan 19, 2005 6:52 am
Location: Detroit

Hw to get JobHandle for any job other than current job

Post by srekant »

Hw to get JobHandle for any job other than current job.
Sree
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,
Can you be bit more specific on what you need.
You can attache the job using job handler though DSAttachJob().

-Kumar
srekant
Premium Member
Premium Member
Posts: 85
Joined: Wed Jan 19, 2005 6:52 am
Location: Detroit

JOB HANDLE

Post by srekant »

kumar_s wrote:Hi,
Can you be bit more specific on what you need.
You can attache the job using job handler though DSAttachJob().

-Kumar
DSJ.ME gives me the current job handle but i want the previous job handle
Sree
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,
Just store assign it to a variable
JHandler1 = DSAttachJob("Job1", DSJ.ERRFATAL)
JHandler2 = DSAttachJob("Job2", DSJ.ERRFATAL)
Use each variable to get the each job handler.

-Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

More than likely, there wouldn't be a 'previous' job handle to connect to. As noted, you should be able to use the other job name in the call to DSAttachJob to establish a new handle to it for your use.

Of course, this all depends on exactly what you are planning on using this for and when/where you do this but that should get you started.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can establish the name of the job controller (the job sequence that is controlling this one) and attach to that, but why would you want to? Anything you can do with that job handle you could do in the parent job sequence itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply