Issuing Remote Procedure Calls

The Mainframe Call Generator features enables a COBOL program to issue a remote procedure call to a COBOL program running on the mainframe.

You must modify the MFA started task JCL in order to specify a library or concatenation as the sole source of any potential RPC requests. This library will be the only repository searched for such modules. This is a standard, non-authorized load library. During Server initialization, Mainframe Access attempts to open the reserved DDNAME=MCGLIB. If this library is not found, Mainframe Call Generator services are not available. You must copy or link-edit any module that you want to use into this library or library concatenation.

     //MCGLIB  DD DSN=your.MCGLIB.LOADLIB,DISP=SHR
     //        DD DSN=your.other.LOADLIB,DISP=SHR
 

In addition, there are certain other pre-requisites for invoking COBOL programs or accessing DB2 plans from started tasks. These modules must be found within the normal STEPLIB, JOBLIB, SYS1.LINKLIB search order.

Module Description
IGZERRE IBM Language Environment Support
DSNRLI DB2 universal RRSAF interface

If these modules cannot be loaded, Mainframe Call Generator services will not be made available.

If the program you call on the mainframe calls any other programs on the mainframe, you must ensure that the program libraries containing the called programs can be found using the standard search of STEPLIB, JOBLIB and/or LNKLST libraries. For example, if PROGA.CBL on the PC calls PROGB on the mainframe, and PROGB subsequently calls PROG1 and PROG2, where PROG1 and PROG2 are in TEST.LOADLIB, you must ensure that TEST.LOADLIB is included in the STEPLIB concatenation.

The COBOL program on the mainframe may contain embedded SQL statements. If this is the case, the Mainframe Access STEPLIB concatenation must include the DB2 run-time module (DSNRLI) for the desired version of DB2 support. The RRSAF run-time facilities will try to verify that the specified plan has been bound. Bind errors are passed back, and summarized on the mainframe SYSLOG. You need to ensure that this is coordinated correctly.

Any COBOL program with embedded SQL statements must be compiled using the DYNAMIC option. This ensures that all the IBM middleware for DB2 access is not statically linked into the module, enabling Mainframe Access to alter the original connection mode for DB2 access to invoke RRSAF.