Technical Blog Post
Abstract
How to create a HARTBEAT process and use it.
Body
From you Connect:Direct for z/OS node you have a remote node that cannot be contacted when a process is submitted to transmit a file to that node. There are several reasons that the remote node can’t be contacted but for this discussion we will just focus on the fact that the remote node is not available. Because of this the submitted process cannot establish a session with the remote node. The process is moved the Timer/Retry queue (TI RE). The process is retried until retry limit is exhausted as defined by the initialization parameters MAXTRIES, the number of retries that will be attempted for this process, and WTRETRIES, the amount of time between retries. Once the retries are exhausted the process will be moved to the Hold/WaitingConnect queue (HO WC).
And there it will sit until someone manually releases it, a new process is submitted on your local node that successfully establishes a session with the target remote node allowing it to execute when a process slot becomes available with the remote node, or a process initiated by the target remote node establishes a session with your local node allowing the process in the local queue to be execute when a process slot becomes available with the remote node.
You don’t want to have to check the queue every so often to see if something is setting there in the HO WC queue waiting for you to manually release it. Nor do you want to wait around for a new process to be submitted by either node that will find the target remote node available and eventually move the process to the execution queue. Either of these could cause you to miss SLAs and possibility cause you to pay larger fines for being late.
There is a way to automate this to an extent by using what we call a HARTBEAT process. This is a process that can be scheduled to run by your automated scheduling package or you can submit it with RETAIN=YES to be released to determine if the target remote node is available for work. You can also submit the process with RETAIN=YES and code STARTT=hh:mm to set a time every day to release the HARTBEAT process to either check for the availability of the target remote node or to establish a session that will allow any processes in the queue for the target remote node to be moved from the HO WC queue to the execution queue.
All a HARTBEAT process has to do is establish a session with a target remote node. It does not have to transfer data to the remote node, run a task, submit a job, or run a job on the remote node. A simple HARTBEAT process will look something like:
HARTBEAT PROCESS SNODE=ADJ.NODE
WAKEUP RUN TASK(PGM=IEFBR14) PNODE
This process will be submitted to the local C:D node and establish a session with the remote node. The RUN TASK will execute the utility IEFBR14 on the PNODE or local node. But you have accomplished your task of either checking to see if the target remote node is available or to establish the session to move processes for the target remote node from the HO WC queue to the execution queue. When the process completes this task ti will be flushed from the queue.
If you have a need for a HARTBEAT to be placed on the queue and executed at the same time every day you would code one like this:
HARTBEAT PROCESS SNODE=ADJ.NODE -
RETAIN=Y -
STARTT=08:00:00
WAKEUP RUN TASK(PGM=IEFBR14) PNODE
This HARTBEAT will execute every day at 08:00 AM to see if the target remote node is available or to establish the session to move processes for the target remote node from the HO WC queue to the execute queue.
You can also submit a HARTBEAT with RETAIN=INITIAL. This process will execute when it is submitted and it will execute every time that the DTF is restarted as long as it stays in the queue. Any process submitted with RETAIN=YES but does not have STARTT= coded will be executed on a restart also.
You can have multiple of these processes in your queue, establishing sessions with many different remote nodes, scheduled to execute in different manners and times.
See member HARTBEAT in SAMPLIB for V5.0 or DGAPHTBT in SDGASAMP for V5.1 and later for additional information on the HARTBEAT process.
UID
ibm11124187