Thread View: bit.listserv.tsorexx
2 messages
2 total messages
Started by gary.joehlin
Mon, 18 Mar 2013 16:00
z/OS REXX Batch interface to cleanly interrupt an intentional DO FOREVER loop
Author: gary.joehlin
Date: Mon, 18 Mar 2013 16:00
Date: Mon, 18 Mar 2013 16:00
29 lines
2355 bytes
2355 bytes
We are running a z/OS Batch REXX which updates a row in a DB2 table every 60 seconds within a FOREVER LOOP. This process was created to trigger a Change data capture mechanism as a sort of 'heart-beat' process. The current REXX logic gets passed parameters to determine (among other things) the amount of time to "SLEEP" between iterations of the SQL UPDATE statement. There are times that we want to terminate this process without causing an ABEND. Since this REXX runs as either a started-task or batch job, an operating system Cancel, causes it to abend with a S222. Our Auto Operations monitoring tool sees this abend and triggers a page-out. We want to have the REXX Logic determine if we terminate it and then end gracefully. I don't believe that a WTOR routine would work here, because a call to that routine would wait for an operator response and then not do its 'heart-beat' update FOREVER. I've tried to use SIGNAL ERROR, FAILURE and HALT, but when I issue the cancel command, the REXX doesn't seem to intercept it and the job abends S222. Suggestions are very welcome. Thanks, Gary J
Re: z/OS REXX Batch interface to cleanly interrupt an intentional DO FOREVER loop
Author: Barry Schwarz
Date: Mon, 18 Mar 2013 18:17
Date: Mon, 18 Mar 2013 18:17
35 lines
3510 bytes
3510 bytes
On Mon, 18 Mar 2013 09:00:19 -0700 (PDT), gary.joehlin@salliemae.com wrote: >We are running a z/OS Batch REXX which updates a row in a DB2 table every 60 seconds within a FOREVER LOOP. > >This process was created to trigger a Change data capture mechanism as a sort of 'heart-beat' process. > >The current REXX logic gets passed parameters to determine (among other things) the amount of time to "SLEEP" between iterations of the SQL UPDATE statement. > >There are times that we want to terminate this process without causing an ABEND. Since this REXX runs as either a started-task or batch job, an operating system Cancel, causes it to abend with a S222. Our Auto Operations monitoring tool sees this abend and triggers a page-out. > >We want to have the REXX Logic determine if we terminate it and then end gracefully. > >I don't believe that a WTOR routine would work here, because a call to that routine would wait for an operator response and then not do its 'heart-beat' update FOREVER. > >I've tried to use SIGNAL ERROR, FAILURE and HALT, but when I issue the cancel command, the REXX doesn't seem to intercept it and the job abends S222. You need something to change that the REXX can test for and then terminate normally when the change occurs. A couple of possibilities: There is an area in the CVT reserved for the user (the site). If you are not using it for anything else, the REXX could set it to zero and run normally as long as it is zero. When you need to stop the REXX, start a task which changes the value in the CVT. The REXX can allocate a dataset, free the DD name, and run normally as long as the dataset exists. When you need to stop the REXX, delete the dataset. A WTOR can work. You don't need to wait for the response. At the end of each sleep period, the REXX can test if the ECB for the WTOR has been posted (and even evaluate the response). -- Remove del for email
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads