Step tab code value

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
ppraveen
Nouveau
Nouveau
Posts: 27
Joined: 01 Jul 2010 12:00

Step tab code value

Post by ppraveen » 27 Nov 2012 7:21

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....

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 28 Nov 2012 11:36

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

User avatar
ppraveen
Nouveau
Nouveau
Posts: 27
Joined: 01 Jul 2010 12:00

Post by ppraveen » 28 Nov 2012 12:23

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.

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 28 Nov 2012 12:24

For your problem use more than one job definition, each with a specific parameter value.

Regards

User avatar
ppraveen
Nouveau
Nouveau
Posts: 27
Joined: 01 Jul 2010 12:00

Post by ppraveen » 28 Nov 2012 6:51

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

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 28 Nov 2012 10:15

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

Post Reply