Set param from a Job control

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
Umbix62
Participant
Posts: 79
Joined: Mon Jan 16, 2006 2:47 pm

Set param from a Job control

Post by Umbix62 »

Hi

a simple question. May I set the Job Server parameters from a script in the relative Job Control?

I try to explain the question better. I have a Job Server and I need to set its parameters after having validate them.

So I have created a Job batch "A" validating two parameters and executing a Job Server "B" after having pass to it the parameters.

I can avoid to create the Job batch "A" and insert the script used to validate the params in the Job Control of the Job "B" but, and this is the meaning of the question, how can I set the params in this case?

I tried to do it directly but it doesn't work.


Thank you very much in advance

Umberto
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please explain exactly what you did and why you believe it did not work. What is the nature of the "script" in which parameter values are to be found? Do you have code in your job control to read that file?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Umbix62
Participant
Posts: 79
Joined: Mon Jan 16, 2006 2:47 pm

Post by Umbix62 »

ray.wurlod wrote:Please explain exactly what you did and why you believe it did not work. What is the nature of the "script" in which parameter values are to be found? Do you have code in your job control to read th ...

Ok. above all, I'm sorry for my english. I know it is orrible.

I have a Job server called "B". This Job receive two params, FromDate and ToDate. Before its running I insert a script in Job control to validate these params. For example, FromDate, initial value '20001010' and ToDate have to be not null and the first has to be greater than ToDate. That is ok. Now if I want to insert a portion of code as this:

If IsNull(FromDate) then FromDate = 19000101

I can do it and DataStage compiles the Job. But during the runtime the FromDate param is '20001010'.

May I assign to this param the value specified in the Job Control? If yes how can I do that?

Thank you very much

Umberto

Of cource this is only an example. The job I have created is more complex.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If I understand the problem you are modifying a job's parameter from inside the job itself (in the job control). This is not allowed and would explain why your changes aren't "seen" in other parts of the job. You will need to do your validation in a sequence and then pass the corrected values to the job itself.
Umbix62
Participant
Posts: 79
Joined: Mon Jan 16, 2006 2:47 pm

Post by Umbix62 »

ArndW wrote:If I understand the problem you are modifying a job's parameter from inside the job itself (in the job control). This is not allowed and would explain why your changes aren't "seen" in other parts of ...
Yes, you understand my problem. I supposed that it is impossible. I'am not able to read your answer. I read only until "in other parts of...". Are you so kind to send me your answer to my email address that is:

umbilo@libero.it

Thank you very much

Have a nice day

Umberto
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I wouldn't circumvent the advantages of chartered membership by sending the rest via e-mail.

But in this case there wasn't anything much after that. You will need to put your validation logic into a job sequence and modify/fix the parameter values and then pass that (validated) value to your actual job.
Post Reply