ULPGMTAB - The Permanent Program Table

In many systems, there are programs which must always be active, as they monitor some critical part of the system. In a TP system, it is sometimes difficult to ensure that a program stays permanently active. Com-plete provides a mechanism that ensures that a particular user program remains active and if it is not, Com-plete will reattach it as a user.

This document covers the following topics:


Functional Overview

The application program must issue an OS ENQ for a particular major and minor name as soon as it is started. This ENQ must then be identified in the permanent program table, and Com-plete will check to see if this ENQ is available every 60 seconds. If the ENQ is available, it indicates that the program is not active and therefore Com-plete will restart the program whose name is associated with the ENQ in the table. Note that is the user's responsibility to ensure that the ENQs are unique within the system and that the correct program uses the correct ENQ. In general, ENQs with a major name of COMPLETE and/or ADATPFE are reserved for internal use.

Building ULPGMTAB

The table is built using the CMPGMTAB macro. The syntax is as follows:

CMPPGMT <function>,
PGM=<program>,
ENQARG=<enq list form expansion>

where:

<function>

Possible options:

GENTAB Starts the generation of a table. This must be the first CMPPGMT entry in the program.
TABEND Ends the generation of a table. This must be the last CMPPGMT entry in the program. ' ' : for an entry in the table.
<program>

is only valid for an entry in the table and is the name of the program to be started should the ENQ be found to be available.

<Enq list...>

is only valid for an entry in the table and is the address of the list form of the ENQ macro which is the ENQ that will be used to test whether or not the applicable program is active. This expansion must be generated as within the permanent program table module.

The ULPGMTAB supplied on the Com-plete distribution source data set is an example which shows how the Com-plete UTIMRM utility is defined.

Activating ULPGMTAB

To cause the permanent program table to be activated, it must be defined as a resident program. The module can have any CSECT name, the module name and therefore the resident program name must be ULPGMTAB.