A cobol program invoking API RESET PACKAGE function (copybook ECHAPRES) receives RC 20,018
JESMSGLG for the batch job that runs the program shows messages:
17.08.50 JOB27632 +C1G0700I PROGRAM NDVRC1 WAS FOUND NOT TO BE AUTHORIZED
17.08.50 JOB27632 +C1G0701I ALTERNATE ID, ACMQ, ESI, ELEMENT AND PACKAGE PROCESSING DISABLED
17.08.50 JOB27632 +ENAPIMGR 20,018 C1G0703E ENDEVOR API OPERATING IN READ-ONLY MODE -EXEC TERMINATED
17.08.50 JOB27632 +BC1PAPI - API HALTED BECAUSE RC=00020 ENCOUNTERED
The JCL invokes the program directly (EXEC PGM=pgmname instead of EXEC PGM=NDVRC1,PARM=pgmname)
Release : 19.0
The job step that runs the program is missing APF authorization as per message C1G0700I
API RESET PACKAGE action (as well as any action that needs to update endevor datasets) needs to run in a jobstep with APF authorization. This is required, for example, to check security and to swap to the endevor alternate ID when needed.
RC 20,018 from the endevor API maps to
Ensure that all the libraries allocated in STEPLIB DD are APF authorized, as required by batch endevor utilities.
Additionally, if the program that calls the API is directly invoked by the JCL, the load module itself needs to be linkedited as APF via EITHER
When a load module is APF, it shows '01' in the APF column in the member list display for the load library.