It is currently 15 Oct 2018 10:41


Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: HOW TO EMAIL SYSOUT
PostPosted: 02 Jul 2010 3:23 
Offline
Nouveau
Nouveau
User avatar

Joined: 02 Jul 2010 12:00
Posts: 5
All,

We are running our Control-M server 6.3.01 on UNIX. I want to send sysout for the job for ENDEDOK/NOT OK conditions.

Can any one expalin the steps involved in this process?

Thanks in advance for your time and your response.

Thanks
Tom


Top
   
 Post subject:
PostPosted: 05 Jul 2010 9:37 
Offline
Nouveau
Nouveau
User avatar

Joined: 07 Jan 2009 12:00
Posts: 18
Location: Argentina, Buenos Aires
hi,

1 -
+------------------------------------------------+
| CONTROL-M System Maintenance Utility |
| Main Menu |
+------------------------------------------------+

1) Shout Destination Tables
2) System Parameters
q) Quit

Enter Option:1

--> option 1 (Create/Modify a Table)
--> option enter SYSTEM
--> yes
--> new entry program, server

2 - from step 'PostProc':

When NOTOK to CTMATTACHSYSOUT Message %%ORDERID %%MEMNAME address@domain.com

Script:

SYSOUT=/controlm63/ctmsrv/tmp

ORDERID=`echo $2 |cut -d " " -f 1`
JOBNAME=`echo $2 |cut -d " " -f 2`

MAIL1=`echo $2 |cut -d " " -f 3`
MAIL2=`echo $2 |cut -d " " -f 4`
MAIL3=`echo $2 |cut -d " " -f 5`

ctmpsm -LISTSYSOUT $ORDERID >$SYSOUT/$JOBNAME

uuencode $SYSOUT/$JOBNAME $JOBNAME.txt | mailx -s "Ejecucion de job $JOBNAME" $MAIL1 $MAIL2 $MAIL3
exit 0


Top
   
 Post subject:
PostPosted: 06 Jul 2010 11:48 
Offline
Nouveau
Nouveau
User avatar

Joined: 02 Feb 2007 12:00
Posts: 59
Location: Stuttgart
Hallo,
we run 6.3.01.500 on Solaris machine.
The 6.3.012 version can send the sysout to mail but if you want in some jobs only to to send then you have to make a script.

We have a script to attach the sysout to mail:
In the script is:

SUBJECT=`echo $* | cut -f '4-' -d " "`
export SUBJECT
DESTINATION=`echo $* | cut -f '3' -d " "`
/......./ctm_server/exe_Solaris/ctmpsm -listsysout $2 >/tmp/mailsysout_ctmbsp.tmp
echo $* >> /tmp/mailsysout_ctmbsp.tmp
echo $SUBJECT >> /tmp/mailsysout_ctmbsp.tmp
echo $DESTINATION >> /tmp/mailsysout_ctmbsp.tmp
/usr/bin/mailx -r "control_m@....de" -s "$SUBJECT" $DESTINATION </tmp>/tmp/mailsysout_ctmbsp.l
og 2>&1
echo $? >>/tmp/mailsysout_ctmbsp.tmp


On the second:
in the shout destinetion table we have a shout to "mail" where we call the script "mailsysout"

And third:
In the job you must make a shout to "mail" with

%ORDERID "email adress" Text

I hope a have help you
Vassilis


Top
   
 Post subject:
PostPosted: 15 Jul 2010 5:03 
Offline
Nouveau
Nouveau
User avatar

Joined: 02 Jul 2010 12:00
Posts: 5
YOWAL,

Thanks very much for your reply. Your code working perfectly fine. However I am getting the Result: Success. at the end of the output in the attchment. Even if the job fails the output is displaying that message. Some times the users may get confused.

How to remove Result: Success from the output of failed job?

Thanks
Tom


Top
   
 Post subject:
PostPosted: 23 Nov 2010 3:46 
Offline
Nouveau
Nouveau
User avatar

Joined: 13 May 2008 12:00
Posts: 57
Another way of doing this is by editing the config.dat file.

On your Unix server, go to:

$HOME/ctm_server/data

vi the config.dat file and append the following to the end of the file (make sure you backup the original config.dat file first)

# E-mail Parameters
ADD_SYSOUT_TO_EMAIL A
ADD_SYSOUT_TO_EMAIL_LIMIT_SIZE 4000KB
MAIL_ADD_SUBJECT_PREFIX N


save and exit.

You will need to stop and start the Control-M server for it to take effect.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved