Endevor API "LIST PACKAGE HEADER" not returning the expected packages
search cancel

Endevor API "LIST PACKAGE HEADER" not returning the expected packages

book

Article ID: 261817

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

The LIST PACKAGE ID function of the endevor CSV utility or its counterpart API function LIST PACKAGE HEADER might not return the expected number of packages given the selection parameters entered in the request. For example, in the report below, the CSV utility is not returning any package even though there are lots of packages in the file and some of them are expected to be committed more than 10 days ago

API0101I  BEGINNING OF API ACTION PROCESSING                          
API0100I  LIST PACKAGE HEADER INFO                                    
API0100I     PACKAGE ID: *                                            
API0100I     TO      DDNAME: PACKAGES                                 
API0100I     MESSAGE DDNAME: C1MSGSA                                  
API0100I     WHERE   DATE TYPE CO IS OLDER THAN 10  DAYS              
API0100I     STATUS SELECTION OPTIONS:                                
API0100I             IN-EDIT.....: N IN-APPROVAL: N                   
API0100I             DENIED......: N APPROVED...: N                   
API0100I             IN-EXECUTION: N EXEC-FAILED: N                   
API0100I             EXECUTED....: N COMMITTED..: Y                   
API0100I                                                              
API0102I  DISPATCHING API ACTION                                      
API0000W  WARNING -- PACKAGE FOUND, BUT IT IS NOT ELIGIBLE FOR SELECTION
API0000I                                                              
API0000I  RETURNED COUNT=00007990, SELECTED COUNT=00000000            
API0000I  PROCESSING COMPLETE - RC=00004 REASON=00012                 

How to do to debug the situation?

Environment

Release : 19.0

Resolution

It is important to note that, after a package header has passed all the endevor filters, package user exit processing is performed for the BEFORE LIST function. The user exit has the possibility of forcing endevor to skip a package that would otherwise be returned to the caller

The processing may be observed in detail by taking an endevor API trace. This is done by adding the following DD statements to the JCL:

//BSTERR DD SYSOUT=*
//EN$TRAPI DD SYSOUT=*

The presence of ddname EN$TRAPI forces the API processing routine to write extended information to ddname BSTERR. The output contains information about buffers exchanged with the caller plus messages about the decisions made for each individual package extracted from the file.

In the below samples, the package file contains one package which is in status EXEC-FAILED and the CSV LIST PACKAGE ID function is executed with the above DDs added to the JCL

If the request specifies no WHERE clause at all so that all packages in the file are to be selected, the trace shows:

ENAPIPKL XLPKRUTN - CALLING ROUTINE BUILDPKG                   
ENAPIPKL BUILDPKG - IOB EXIT ROUTINE, PACKAGE ID: PACKAGEPTEST1 -note 1
ENAPIPKL BPKG010  - CALLING PROGRAM ENAPISEP                   
ENAPIPKL BPKG020  - ISSUE LIST BEFORE EXIT SECURITY CALL        -note 2
ENAPIPKL BPKG030  - RECORD SELECTED, PACKAGE ID: PACKAGEPTEST1  -note 3

Notes:

  1. This message shows up for each and every package retrieved from the file and passed through the selection criteria
  2. This message indicates that the package has passed the endevor selection criteria but the user exits (if present) may still cause it to be skipped. It is important to note that the message shows up regardless of whether there are package user exits defined.
  3. This message indicates that the package has been selected and will be returned to the caller. Note that this message is NOT issued when a package user exit has instructed endevor to skip the package

If the request specifies WHERE STATUS COMMITTED, there are no packages returned to the caller. In this case the trace shows:

ENAPIPKL XLPKRUTN - CALLING ROUTINE BUILDPKG                                    
ENAPIPKL BUILDPKG - IOB EXIT ROUTINE, PACKAGE ID: PACKAGEPTEST1                 
ENAPIPKL BPKG010  - CALLING PROGRAM ENAPISEP                                    
ENAPISEP XLPKRUTN - PACKAGE ELIMINATED BY STAT SELECTION CRITERIA, ID: PACKAGEPTEST1 -note 1
ENAPIPKL BPKG010  - RETURN FROM PROGRAM ENAPISEP, RC=00004                       -note 2

Notes:

  1. This message indicates that the package status doesn't match the selection criteria
  2. The absence of the 'RECORD SELECTED' message indicates that the package has been skipped

The possible names for the selection criteria in the 'PACKAGE ELIMINATED' message are:

  • APPR - Specified approver is not an approver for the package
  • DAYS - The package doesn't match the date selection criteria
  • ENTP - The package does not match the 'enterprise package' selection criteria
  • STAT - Package status does not match the selection criteria
  • TYPE - Package type not matched (Standard vs Emergency package)