-
1. Re: Agentless Remote OS Job - Copy Sysout
MunKeong Lee Mar 4, 2018 8:27 PM (in response to Debra Greszler)Hi Debra
The output is copied to the agent's directory after remote job is completed and then deleted from the remote host. Handle Output will then act on the output residing in the agent's directory and not in the remote host.
A workaround for your problem is to pipe the output of your script to the tee command which will preserve the output in addition to saving the output to a file. For example:
myscript | tee <your filename>
Hope this helps.
Regards,
MK
-
2. Re: Agentless Remote OS Job - Copy Sysout
Debra Greszler Mar 4, 2018 11:40 PM (in response to MunKeong Lee)MK,
Thanks for your response. In the OS job that is running this script, I can only enter the script file name can cannot add the pipe command. The job requestor would like the output file to include the date/time in the file name and be routed to a different folder for failures and successes. I was hoping to leverage the Handle Output to fulfill this request.
Thanks,
Debbie
-
3. Re: Agentless Remote OS Job - Copy Sysout
MunKeong Lee Mar 5, 2018 12:44 AM (in response to Debra Greszler)Hi Debra
Can you get the job requestor to create a wrapper script that pipe the script output to tee and the Control-M job will execute the wrapper script instead? I don't think Handle Output or any of the out-of-box features of Control-M will be able to do what you intend to do.
Regards,
MK
-
4. Re: Agentless Remote OS Job - Copy Sysout
Debra Greszler Mar 5, 2018 4:15 AM (in response to MunKeong Lee)Thanks MunKeong.
I added an MFT step to then copy the output file to the appropriate directory. Your explanation of how Control-M was handling the output helped me craft this solution.