Return code -3 when starting the CARMA server

Problem

You get a return code -3 when starting the CARMA server.

Error

Look in the CARMA server job output in SDSF - cra&port# and see:
—- CRANDVRA CMD START 16:46:22 ————————- 
invoking NDVRC1 PGM(CRASERV) PARM(13935 420) 
136 *-* Cmd 
+++ RC(-3) +++ 
—- CRANDVRA CMD END 16:46:22 ————————- 

Explanation and resolution

Usually, the invocation fails with RC -3 when there is an APF authorization issue. Endevor must be APF-authorized, and when it is accessed using STEPLIB or TASKLIB, all other libraries in STEPLIB or TASKLIB, such as data set hlq.SFEKLOAD, must also be APF-authorized or z/OS® removes the APF authorization of those libraries that do have the authorization. See the code example in the figure "crastart.endevor.conf - CRASTART with CA Endevor® SCM RAM" in chapter "(Optional) Common Access Repository Manager (CARMA)", section "CRASTART with CA Endevor® SCM RAM", subsection "Customize crastart.endevor.conf" of the IBM® Developer for z/OS Host Configuration Guide (SC23-7658). This is where you customize the file crastart.endevor.conf. There is a line
TASKLIB = dataset1,dataset2,... 
All of those data sets must be APF authorized.

Additional information

None.