Additional programming considerations
GIMAPI is installed in SYS1.LINKLIB and SYS1.MIGLIB with the GIMSMP module. Because GIMAPI resides in LINKLIB, which is considered an authorized library, GIMAPI is available to both authorized and unauthorized callers.
The GIMAPI load module cannot be reused. A new copy must be brought into virtual storage for each use. Each task must load its own copy of GIMAPI. However, a single task can load GIMAPI once and then call GIMAPI several times before deleting GIMAPI.
GIMAPI runs in AMODE 31. It will obtain storage from either above or below the 16MB line, based on the AMODE of the caller upon entry to GIMAPI.
GIMAPI will not provide an ESTAE environment. If an ESTAE environment is required, the calling program must establish it before invoking GIMAPI.
Callers of GIMAPI should not link-edit a copy of the load module into the application program. GIMAPI should be called as an external routine.
The caller of GIMAPI must first load the GIMAPI load module into virtual storage using the appropriate syntax for the language in which the application is written. For example, an assembler application may use the LOAD or LINK macros. Once the GIMAPI module is loaded into virtual storage, it can be called by the application.
The caller of GIMAPI must adhere to standard linkage conventions. For more information regarding standard linkage conventions, refer to z/OS MVS Programming: Assembler Services Guide and the appropriate documentation for the language you are using for your application.
GIMAPI can only be invoked from a user-written program. GIMAPI cannot be invoked from JCL.
GIMAPI exposes certain control blocks to the user. These are the data structures defined in topic Data structures for QUERY command. A macro data set is provided for you to include the definition of the control blocks in your program. The DDDEF of the macro library is MACLIB for the target library and AMACLIB for the distribution library. Refer to Programming in C, Programming in PL/I, and Programming in assembler for the member names used for each language.