I already have SET GLOBAL and GetRemoteVariable statements in the jobs to get messages from the remote agent but they are just messages that "I" create. I want to get the error code that the scheduler generates and put THAT into the global variable. According to your previous message the only way to do that is to parse the schedule.log file. Thank You, John : You can try to read and parse the log file on the agent. : Alternatively you can rewrite your script to look like the following: Dim : GLOBAL.last_error, number : OnErrorGoTo label_1 : statement-block : OnErrorGoTo label_2 : statement-block : OnErrorGoTo label_3 : statement-block : Exit : label_1: Set GLOBAL.last_error, 1 : Exit : label_2: Set GLOBAL.last_error, 2 : Exit : label_3: Set GLOBAL.last_error, 3 : Exit : You can then pass the value stored in the GLOBAL.last_error variable back to : the Master. Please see previous message thread for "how to..."
|