-
1. Re: Job output
Mark Francome Feb 10, 2019 12:53 PM (in response to Apoorv Chaturvedi)1 of 1 people found this helpful -
2. Re: Job output
Apoorv Chaturvedi Feb 11, 2019 2:50 AM (in response to Mark Francome)Hi Mark,
Please find the screen shot below . I have tried to follow the steps mentioned by you . Can you tell me how to add a force job in the same ‘On’ and ‘Do’ as you have mentioned in the solution .
BR
Apoorv
-
image001.png 15.7 K
-
-
3. Re: Job output
Mark Francome Feb 11, 2019 3:14 AM (in response to Apoorv Chaturvedi)1 of 1 people found this helpful -
4. Re: Job output
Apoorv Chaturvedi Feb 11, 2019 3:29 AM (in response to Mark Francome)Hi Mark,
So does that mean they will still receive the out file attached in the mail ? or the whole out printed in the email only.
BR
Apoorv
-
5. Re: Job output
Mark Francome Feb 11, 2019 3:50 AM (in response to Apoorv Chaturvedi)In this case there would be 2 emails, the standard one that you have and the one you are going to "force job" in. Just remove the existing email alert.
-
6. Re: Job output
Apoorv Chaturvedi Feb 11, 2019 5:19 AM (in response to Mark Francome)1 of 1 people found this helpfulSo you mean to say there should be one out condition force job with the main job wherein I have to give ctmpsm -LISTSYSOUT %%MY_ORDERID | mailx -s . And I should disable the notification of the main job and enable the notification for the force job ?
-
7. Re: Job output
Apoorv Chaturvedi Feb 11, 2019 5:24 AM (in response to Mark Francome)Is the below correct ?
My doubt here is where I have to give ‘ctmpsm -LISTSYSOUT %%MY_ORDERID | mailx -s’
-
image001.png 17.5 K
-
-
8. Re: Job output
Mark Francome Feb 11, 2019 9:42 AM (in response to Apoorv Chaturvedi)2 of 2 people found this helpfulSorry for not being clear - the ctmpsm ... command is a non-scheduled job that you force in. It would run on your Control-M Server.
Here's an example and the command line job you force in -
ctmpsm -LISTSYSOUT %%G_ORDERID | mailx -r 'Service.ControlM@acme.org (ControlM Server)' -s "Databasebase script %%G_MEMNAME has failed on %%G_NODEID - see output below" Service.DBA@acme.org
-
9. Re: Job output
Apoorv Chaturvedi Feb 13, 2019 3:36 AM (in response to Mark Francome)Hi IIyas,
We are getting the below output :
+ ctmpsm -LISTSYSOUT 04x8d
+ mailx -s
mailx: option requires an argument -- s
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -\
S OPTION users
cat: write error: Broken pipe
Below is the on do actions Tab screenshot as I have scheduled after reading the workaround in the thread :
Avj_notify is force in job we have scheduled with the main job .
-
image001.png 18.7 K
-
-
10. Re: Job output
Ilyas Shaikh Feb 13, 2019 4:29 AM (in response to Apoorv Chaturvedi)Hi Apoorv,
The syntax for mailx command is as below:
mailx -s "Subject" -r "FromId" "ToList"
Kindly check whether you are able to send a sample mail from the server then configure the same in job.
I guess you need to check with system admin for "cat: write error: Broken pipe" error.
Regards,
Ilyas Shaikh
-
11. Re: Job output
Apoorv Chaturvedi Feb 13, 2019 5:37 AM (in response to Ilyas Shaikh)Hi IIyas,
The syntax you mentioned is running fine. But our purpose is not getting solved which is to print the output in the mail directly of the main job with help of this force job we added in DO actions .
BR
Apoorv
-
12. Re: Job output
Ilyas Shaikh Feb 14, 2019 3:06 AM (in response to Apoorv Chaturvedi)Hi Apoorv,
Did you followed the steps shared by Mark Francome.
If you find it difficult, you can also configure the jobs as follows:
And second job 'SendSysoutOnEmail' will be as follows:
Regards,
Ilyas Shaikh
-
13. Re: Job output
Apoorv Chaturvedi Feb 14, 2019 4:39 AM (in response to Ilyas Shaikh)Hello IIyas ,
Thanks for your input . But I am not receiving the printed mail output on my email . Kindly check the screen shots :
On do actions for 1st job
2nd job :
Kindly suggest how to resolve this or if I am missing anything do let me know .
BR
Apoorv
-
image002.png 15.8 K
-
image001.png 15.7 K
-
-
14. Re: Job output
Mark Francome Feb 14, 2019 5:20 AM (in response to Apoorv Chaturvedi)Are you running the ctmpsm/mailx ... command in your Control-M Server? It does not look like it.
A quick test would be to run the ctmpsm/mailx ... command from the command prompt on the Control-M Server (as the Control-M Server user).