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.
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.
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.
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.