Thanks to Andree!!! I have made a fair amount of progress in writing a .csf script which connects, and then logs on, issues a command, disconnects, and logs a line to a log file. If any of the steps fail, then the HandleError is called, and logs the error, including potentially the error that appears on line 24 of the screen, returned from the mainframe.
However, there is still a case that I cannot see how to "trap" and log. The first line of my script is EMStartSession calling a .rsdm profile. If, e.g., while in the debugger, I disconnect the network cable as the EMStartSession is executing, I get the below WinSock 10065 error pop-up. However, the script seems to continue, and just times out every step along the way.

Since I will ultimately run the script from the Windows Scheduler, I would like:
1. To ensure that there is no pop-up and
2. to be able to catch the winsock error (or any other error/failure), log the error, and exit the script.
Is there a way to do this?
Thanks,
Larry
#Rumba

