Endevor actions may execute Endevor processors which in turn may execute whatever program.
Even though an Endevor processor is written using the same syntax as MVS JCL, a program executed by an Endevor processor runs in a slightly different environment than a program executed by JCL.
This article explains the differences.
A program being executed by an Endevor processor runs as a subtask within the job step that is running the Endevor action. This is different from a program executed by JCL which runs in the so called 'job step TCB'. It's uncommon, but depending on the program logic, this might affect the program.
Technically speaking, the job step TCB is pointed to by field TCBJSTCB in the current TCB, so that:
The program will have less storage available when running in an Endevor processor. this is because it is running in an address space where Endevor is already running and has already built all its control blocks.
Therefore, if the program is very demanding in terms of storage, it could experience 'out of storage' errors or abends (like S878 or S80A) which could not arise when the program is executed via JCL. That would happen simply before there is more storage available when the program runs under JCL.
When a program runs under JCL, the termination of the program implies the termination of the JCL step, which causes MVS to automatically clean up resources used by the job step. For example:
This cleanup does NOT take place at the end of an Endevor processor step since it does not cause the termination of any MVS job step. If the program being executed does not clean up its resources itself before termination, this may cause subsequent problems.
For example, if the program acquires storage in a subpool that is automatically freed by the system at the end of the job step and neglects to free it at termination hoping that MVS will free it, the storage will remain acquired until the end of the Endevor jobstep. If multiple actions are run during the job step which cause the program to run multiple times, Endevor will sooner or later run out of storage after many actions are executed.
Endevor establishes a mechanism known as 'SVC screening' for the TCB where the processor program runs, by setting flag TCBSVCS and pointer TCBSVCA2 in the TCB. This allows Endevor to gain control when the program issues certain SVC calls in order to insert its own preprocessing and post-processing to the logic of the SVC.
Using this technique, Endevor may, for example, temporarily swap the security environment to that of the Endevor alternate ID during OPEN processing, or take note of the members read and written by the program in order to collect component list information
The screened SVCs are:
The processor program runs without APF authorization (even though it loads from an APF library and is linked with AC(1). If a processor program needs to be attached with APF authorization, its name needs to be added to the customizable Endevor authorized programs table (C1GTAPGM)