Parameter set and Job in After Job Sub-Routine

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Parameter set and Job in After Job Sub-Routine

Post by mavrick21 »

I have a parameter set defined with default values and value files.

I'm using UNIX script to call a Sequence and setting Parameter Set = Value File name in the script. The Sequence has only one job in it. Lets call it Parent job. The Parent job calls another Child job in its After Job sub routine.

Is there a way to set Parameter Set = Value File for the Child job before calling it in After Job sub routine of the Parent job?

Thanks for you time!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry that I'm not going to answer your question but instead ask another. Why would you not simply have the Sequence job run both jobs rather than running a job 'after job'? [shudder] If it's because the child needs information from the parent, that could be landed, picked up by the Sequence and passed to the child in a much more visible manner.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Post by mavrick21 »

chulett,

The alternate solution mentioned by you was what I was going to implement if I didn't get a solution to my question.

I'm still wondering if there is a solution to my question.

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

Post by chulett »

OK. How exactly are you running the job after job? Script, routine, something else? Do you really need to pass anything, i.e. can it not just default in the child job? Pardon my ignorance as I don't have any parameter set experience to speak of, can you please detail what exactly it is you need to pass? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Post by mavrick21 »

Unix Script -> Sequence -> Parent Job ->
(Once Parent Job completes successfully) After Job Sub-Routine calls Child Job.

I want to pass parameter set value set in UNIX script to Child Job. In other words I want to fetch parameter set = File value that is passed to Sequence from the script?

It can't default in Child job.

Thanks for your time Craig
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Post by mavrick21 »

Think I got it.

These are the steps I'll write in After Job Sub-Routine
1) DSAttachJob(Sequence)
2) Var = DSGetParamInfo(Sequence,"PARMSET",DSJ.PARAMVALUE)
3) ErrCode = DSDetachJob (JobHandle_1)

4) DSAttachJob (Child)
5) DSSetParam(Child,"PARMSET",Var)
6) DSRunJob(Child,DSJ.RUNNORMAL)

Craig, Thanks for your time!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If the 'After job' section where you are running this from is the Sequence job itself then you don't need to attach to it, use DSJ.ME for the handle to mean the current job. And don't forget all of the other child stuff - wait for job, check status, detach.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mavrick21
Premium Member
Premium Member
Posts: 335
Joined: Sun Apr 23, 2006 11:25 pm

Post by mavrick21 »

Craig,

Parent job has the after job sub routine. Hence I'm using attach.

I've taken care of other things.

Thanks
Post Reply