Batch Endevor CSV job fails with ENAPIMGR 20,031 error

Document ID : KB000121464
Last Modified Date : 22/11/2018
Show Technical Document Details
Issue:
Running the following JCL:
//JSTEP2  EXEC PGM=NDVRC1,PARM='CONCALL,DDN:CONLIB,BC1PCSV0'
//ULT@OFF  DD  DUMMY  
//SYMDUMP  DD  DUMMY 
//SYSUDUMP DD  SYSOUT=* 
//STEPLIB  DD  DSN=SYS.ENDEVOR.PROD.AUTHLIB,DISP=SHR
//CONLIB   DD  DSN=SYS.ENDEVOR.TEST.LMG.CONLIB,DISP=SHR
//         DD  DSN=SYS.ENDEVOR.PROD.CONLIB,DISP=SHR 
//BSTIPT01 DD  *         
 LIS PRO GRO '*'               
     TO FILE CSVFILE  
 FRO ENV 'DEVELOP' SYS '*'  TYP '*' STA '*'   
 OPT NOC .          
/*                   
//CSVFILE  DD  DSN=DPMB.ENDEVOR.CSVGRPFE,   
//             UNIT=DISK,DISP=(,CATLG),SPACE=(CYL,(1,1),RLSE),           
//             DCB=(RECFM=VB,LRECL=4092,BLKSIZE=4096)       
//C1MSGS1  DD  SYSOUT=*             
//BSTERR   DD  SYSOUT=*              
//***                   


results in:
 CA Endevor SCM Version 18.0.12           Copyright (C) 1986-2018 CA. All 
   *** LIBRARY MANAGEMENT - N5  ***                    CA Endevor SCM           
 DIAGNOSTICS OUTPUT LISTING                                                     
                                                                                
 ENAPIMGR 20,031 THE REQUEST STRUCTURE HEADER IS INVALID 0040000004700002D3D7C7D8     
Resolution:
The request block in the dumped message contains: 
Length: 0040 - Correct 
Flags - 0000 - correct 
Numeric ID - 0470 - List processor group - correct 
Character ID - LPGQ - List processor group query structure - correct 


The validation that leads to this message is done by comparing the received structure header with tables hardcoded in API load module ENAPI000. This fact leaves only two possibilities: 
- Module ENAPI000 is incorrect (it is missing a subprogram which should be statically bound within it) 
- Module ENAPI000 is overlaid in storage for whatever reason. 

First check and verify integrity of ENAPI000 
- Locate the first occurrence of ENAPI000 in the CONLIB DD library chain 
- Run the following JCL: 
//STEP1 EXEC PGM=AMBLIST 
//SYSPRINT DD SYSOUT=* 
//SYSLIB DD DISP=SHR,DSN=library.containing.ENAPI000 
//SYSIN * 
LISTLOAD OUTPUT=XREF,MEMBER=ENAPI000 
/* 

In the AMBLIST output, verify that 
- In the module map, there is a CSECT named ENAPIINV which contains a symbol named INVTABLE 
- In the cross-reference, CSECT ENAPIMGR refers to symbol INVTABLE 

If either ENAPIINV or INVTABLE are missing, this is the problem. Find a correct copy of ENAPI000. 

Otherwise we must suspect that ENAPI000 is overlaid in storage and we need an SVC dump. In order to (try to) see what happens: 
- Remove DD statements for BSTERR and EN$TRMOD from the JCL 
- Run it once to verify that message +ENAPIMGR 20,031 THE REQUEST STRUCTURE ... prints to JESMSGLG.
We'll use that message to capture the dump 

- Set the SLIP trap by the following command: 
/SLIP SET,J=your-jobname,MSGID=ENAPIMGR, A=SVCD,END 

Note that the message displays as +ENAPIMGR and the trap specifies MSGID=ENAPIMGR. This is not a mistake. 

Open an Endevor support case on CA Support Online and provide the dump and the output from the AMBLIST.