Set tab variables

All questions about Control-M jobs definitions
Post Reply
User avatar
ppraveen
Nouveau
Nouveau
Posts: 27
Joined: 01 Jul 2010 12:00

Set tab variables

Post by ppraveen » 27 Sep 2012 12:28

How PRECMD and POSTCMD is useful in the set tab,can anyone please explain with an example.
And the command which mentioned in PRECMD has any relation with the current job script or command?

User avatar
manjuhm21
Nouveau
Nouveau
Posts: 3
Joined: 19 Jan 2012 12:00

Post by manjuhm21 » 04 Oct 2012 7:20

Hi, you can use PRECMD and POSTCMD to run many utilities in Control-M

PRECMD : will execute before running main command line of the job.
POSTCMD : will execute after completing the execution of main command line of the job.

examples:
you can assign any utilities but here im using a simple mailx command.

POSTCMD(Var name) mailx -s "Ejecucion de job $JOBNAME" $MAIL1 $MAIL2 $MAIL3(Var value)

you can refer below posts.

http://www.scheduler-usage.com/modules. ... ght=precmd

http://www.scheduler-usage.com/modules. ... ight=mailx

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

Post by mauriziog » 26 Oct 2012 12:08

PRECMD and POSTCMD hasnt return codes, so if the command run did not execute well, the job terminate ok.
Consider this and if the PRECMD is important, add a control with shout to alert and similar.

Post Reply