Page 1 of 1

Step tab code value

Posted: 27 Nov 2012 7:21
by ppraveen
Hi,

Can anyone explain about the value to mention in the code on steps tab.
i have a web service job with cyclic, which submits b/w 8:00 and 20;00.
so if job runs b/w 8:00 and 13:00, parameter should pass a vaule as Always ( which can be defined in the set tab), if b/w 13:00 and 14;00, parameter should pass as Never, and lastly b/w 14;00 and 20:00 run, parameter should again pass a vaule as Always.
So in this case can i define the on statement Code as %%Time<1300 and do statement to setvar? and remaining too...
Actual my question is when and what can we use the code value.

Thanks....

Posted: 28 Nov 2012 11:36
by philmalmaison
Hi,
you can use twice statement or code:
statement is related to OSCOMPSTAT
code search for a specific value (or text)

so if you insert a set -x in a part off the script wating for example for the words "RUN KO" you enter for the job:
on statement * code "RUN KO" do something.
Regards,
Philmalmaison

Posted: 28 Nov 2012 12:23
by ppraveen
My Question is what is the value can we assign to Code.( In general)
We can write any supporting statement or something which should be an outcome of any script.
In my requirement which i mentioned above, there i used code as %%time<13:00, which is acceptable by controlm.

Posted: 28 Nov 2012 12:24
by mauriziog
For your problem use more than one job definition, each with a specific parameter value.

Regards

Posted: 28 Nov 2012 6:51
by ppraveen
Eventually i had set three different jobs, but just want to try to do in a sinlge job itself,by setting up in the steps tab.

So what is the error if i setup like
ON
Statement=* Code= %%time<13:00
Do
Setvar=/Authorization value= Always.

And similarly for other timing as well. Please let me know.

Regards,
Praveen

Posted: 28 Nov 2012 10:15
by mauriziog
In code you read the output(=SYSOUT), you cant use the sintax you have put here.
The other manner is to sent to the scritp the time value and in the script writing some message string that in the step you can capture and set the variable.

Regards