EZABX000 An error has occurred in program when calling dynamically a Microfocus Cobol subpgm from the Easytrieve pgm.
search cancel

EZABX000 An error has occurred in program when calling dynamically a Microfocus Cobol subpgm from the Easytrieve pgm.

book

Article ID: 54923

calendar_today

Updated On:

Products

Easytrieve Report Generator

Issue/Introduction

This error message

EZABX000 An error has occurred in program when calling dynamically a Microfocus Cobol subpgm from the Easytrieve pgm.

is caused because the Easytrieve runtime can't find/load the particular sub program. There are several reasons why this may occur.

 

Environment

Easytrieve Report Generator, non-mainframe environment

Resolution

  1. In Unix environments, the sub programs needs to be compiled and placed into a shared library that is in the LD_SHARED_LIBRARY path environment variable. Directories listed in LD_SHARED_LIBRARY path are searched for shared libraries. AIX specified environment variable is LIBPATH, not LD_SHARED_LIBRARY.

  2. Subroutine path should be set with environment variable LIBPATH.

  3. The following are considerations to make when calling COBOL programs from Easytrieve:

  4. Calling conventions must match. Since Easytrieve uses C calling convention, the COBOL program also needs to use it.

    1. Parameter types must match. Each parameter's Easytrieve data type should be carefully matched to an appropriate COBOL data type.

    2. Parameters are passed by reference. This means a pointer is passed for each parameter and the callee is able to modify the caller's storage.

    3. Code sets should match. Whether the Easytrieve program passes ASCII or EBCDIC data, the COBOL program needs to be compiled for that run-mode.

    4. Export the COBOL entry points. Each COBOL entry point that is called from Easytrieve needs to be exported so that it can be found after the Subroutine/DLL is loaded. If Microsoft's linker is used, this is done with the /EXPORT switch.

  5. The Easytrieve program should have defined a DECLARE and CALL statement for each C and Cobol subprogram and a .exp file for C-subprograms containing a C-subprogram name.

  6. Please check the subprogram name in the CALL statement in the Easytrieve program. The subprogram name is case sensitive and should match the name of the called module.