Do Ok/Do Mail question.

All questions about Control-M jobs definitions
Post Reply
User avatar
pone2332
Nouveau
Nouveau
Posts: 7
Joined: 03 Sep 2011 12:00

Do Ok/Do Mail question.

Post by pone2332 » 03 Sep 2011 4:38

Hello All,

Looking for some help with Do Mail/Do Ok. Currently I have a job set up with the following statements.

Do Ok COMSTAT>0
Do Mail COMSTAT>0

The issue is the job does exit with a valid Retrun Code=29 and I don't want to receive mail for that return code. Wondering how I can receive mail on all errors greater then 0 except 29.

Thanks in Advance

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

Post by philmalmaison » 05 Sep 2011 4:44

Hi,
try
on statement = *
((COMPSTAT > 0) and (COMPSTAT != 29))
do MAIL

Regards,
Philmalmaison

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

Post by philmalmaison » 05 Sep 2011 4:52

Hi,
Sorry it's not the solution
Regards,
Philmalmaison

User avatar
GrahamH
Nouveau
Nouveau
Posts: 30
Joined: 20 Jan 2006 12:00

Post by GrahamH » 07 Sep 2011 8:20

Hi.

You could try

ON stmt * code COMPSTAT LT 29
DO MAIL
ON stmt * code COMPSTAT GT 29
DO MAIL

Regards

Graham

User avatar
Hagar
Nouveau
Nouveau
Posts: 27
Joined: 19 Feb 2009 12:00

Post by Hagar » 09 Sep 2011 10:40

This works even better

On stmt * code COMPSTAT=29
Do OK
On stmt * code NOTOK
Do Mail

In this case both 0 and 29 is considered OK

User avatar
pone2332
Nouveau
Nouveau
Posts: 7
Joined: 03 Sep 2011 12:00

Post by pone2332 » 14 Feb 2012 9:31

Its been a while but wanted to say thanks for all the responses/scheduling help.

Post Reply