Sample programs that use GIMAPI
This topic contains
three sample programs that use GIMAPI. Each program does the same
basic function, where differences are mostly due to the syntax of
the languages involved.
Note: In addition to the programs documented
here, SYS1.SAMPLIB provides other sample programs that use GIMAPI,
such as GIMCRSAM and GIMPRSAM.
Each program follows these steps:
- The query described in Example of QUERY command is set up to be invoked. The global CSI data set used is 'SMP.VSAM.CSI'.
- GIMAPI is called with the QUERY command to retrieve the data.
- If the query is successful, it calls a generic result print function that prints the data retrieved from any query.
- Once these are done, the storage is freed by calling GIMAPI with the FREE command.
The following is an example of the output of the sample programs:
Entry Type: SYSMOD
----------------------------------------
ENAME : SMOD19
ZONE : TARG1
INSTALLDATE : 07340
MOD : MOD01
MOD02
----------------------------------------
ENAME : SMOD22
ZONE : MYTARG
INSTALLDATE : 07348