Can a Before-Job subroutine set a job parameter with a value

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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

olgc,

this functionality has been removed and won't work at your version 7. Job parameters are no longer modifiable.

You could always call your subroutine in a sequencer and use that result as the input parameter for your job.
olgc
Participant
Posts: 145
Joined: Tue Nov 18, 2003 9:00 am

Post by olgc »

ArndW, thanks for your quick response. I don't understand "Job parameters are no longer modifiable.". Can we still call DSSetParam(hJob1, parName, parValue) to set a value to a job parameter?

Yes, in this post, I mean if a Before-Job subroutine can set a job parameter of the job invoking the Before-Job subroutine.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can always modify parameter values outside of the job. But the "before job" is executed after the job has been invoked but before it does anything, so it has gotten parameter values and at that point in time they can no longer be modified.

With older versions of DataStage one would pass in "dummy" parameters and then modify them in the before-job or job control sections before using their values in the job body itself. This was never really documented as being allowed, so even though nobody was happy about losing this functionality it really was Ascential just patching a flaw.
Post Reply