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.
Subroutine path should be set with environment variable LIBPATH.
The following are considerations to make when calling COBOL programs from Easytrieve:
Calling conventions must match. Since Easytrieve uses C calling convention, the COBOL program also needs to use it.
Parameter types must match. Each parameter's Easytrieve data type should be carefully matched to an appropriate COBOL data type.
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.
Code sets should match. Whether the Easytrieve program passes ASCII or EBCDIC data, the COBOL program needs to be compiled for that run-mode.
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.
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.
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.