Getting Sequencer name from the job name

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

DSMaestro
Participant
Posts: 14
Joined: Thu Oct 15, 2009 6:47 am

Post by DSMaestro »

Hi,

I cereated the below routine with the name 'GetJobSequencerName'

$include DSINCLUDE JOBCONTROL.H
JobName=Arg1
JobHandle = DSAttachJob (JobName, DSJ.ERRFATAL)
controllerList=DSGetJobInfo(JobHandle,DSJ.JOBCONTROLLER)
ErrCode=DSDetachJob(JobHandle);
print controllerList;
Ans=controllerList

Called in my job through tranformer as follows

GetJobSequencerName(JobName)
It is generating the expected results.

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

Post by chulett »

Me, I would get rid of the 'print' statement, it is completely unnecessary. That and mark this a Resolved using the big button at the top of the page. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply