Submit Exit

Note: User specified program names are limited. For more information, refer to User Specified Program Limitation Feature.

There are two kinds of Submit exits, Stage 1 and Stage 2. The Stage 1 Submit exits always run at the time of the Submit, in the address space of the submitter (API submit) or the DTF being submitted to (SUBMIT Statement in a Process, sometimes called SUBMIT WITHIN). The Stage 2 Submit exit runs in the DTF address space before it queues the Process for execution, usually very soon after Stage 1 processing completes. But, if the DTF is not active when the Process is submitted (e.g. ESF Submit), the interval between the time Stage 1 and Stage 2 exits run can be large.

The Unauthorized Stage 1 Submit exit is just the new name for the pre-C:D 6.2 Stage 1 Submit exit. It provides an interface to a user-written program when you submit a Process. With this interface, the user program can change Process information, such as Process name, priority, class, and secondary node, and copy step information such as data set name.

The Authorized Stage 1 Submit exit is new to Connect:Direct 6.2. It can do anything the Unauthorized Stage 1 Submit Exit can do, as well as run APF authorized. It is invoked after the legacy Stage 1 Submit exit.

It is possible for an API submitter to circumvent the Stage 1 Submit exits if they can omit them from the load module search sequence. To prevent this, you can deny the ordinary user UPDATE access to an APF authorized library, because the Submit exits must be loaded from an APF authorized library.

The Stage 2 Submit exit runs APF Authorized in the DTF address space. If this exit is active, it is not possible for the Submitter to circumvent its execution. If TCQE flag TQSUBAOK is ON, it indicates the Submit was allowed by the Authorized Stage 1 Submit exit. If it is OFF the Authorized Stage 1 Submit exit was not present during Stage 1 Submit. The flag can be tested in a Stage 2 Submit exit to ensure an API submitter invoked the Authorized Stage 1 Submit exit. If the Authorized Stage 1 Submit exit runs and does not allow the Submit, the flag will be OFF, and the Stage 2 Submit exit will not be called, since the Submit was already rejected by Stage 1 processing.