Page 1 of 1

Set param from a Job control

Posted: Thu Jun 15, 2006 3:10 am
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

Posted: Thu Jun 15, 2006 4:57 am
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?

Posted: Thu Jun 15, 2006 7:03 am
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.

Posted: Thu Jun 15, 2006 7:24 am
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.

Posted: Thu Jun 15, 2006 7:33 am
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

Posted: Thu Jun 15, 2006 7:38 am
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.