GCMD call

The Get Command (GCMD) call retrieves the response segments from IMS TM when your application program processes IMS commands using the CMD call.

Format

Read syntax diagramSkip visual syntax diagramGCMDi/o_pcbaibi/o_area
Call Name DB/DC DBCTL DCCTL DB Batch TM Batch
GCMD X   X    

Parameters

i/o pcb
Specifies the I/O PCB, the first PCB address in the list that is passed to the program. This parameter is an input and output parameter.
aib
Specifies the application interface block (AIB) that is used for the call. This parameter is an input and output parameter.
The following fields must be initialized in the AIB:
AIBID
Eye catcher. This 8-byte field must contain DFSAIBbb.
AIBLEN
AIB lengths. This field must contain the actual length of the AIB that the application program obtained.
AIBRSNM1
Resource name. This 8-byte, left-justified field must contain the PCB name IOPCBbbb.
AIBOALEN
I/O area length. This field must contain the length of the I/O area that is specified in the call list.
i/o area
Specifies the I/O area to use for this call. This parameter is an output parameter. The I/O area must be large enough to hold the largest segment passed between the program and IMS TM.

Usage

When you issue a CMD call, IMS TM returns the first command response segment to the application program's I/O area. If you are processing commands that return more than one command response segment, use the GCMD call to retrieve the second and subsequent command response segments. IMS TM returns one command response segment to the I/O area of your application program each time the application program issues a GCMD call. The I/O area must be large enough to hold the longest message segment expected by your application program. IMS allows a maximum segment size of 132 bytes (including the 4-byte LLZZ field).

The CMD and GCMD calls are typically used to perform functions that are usually performed by someone at a terminal. These programs are called automated operator (AO) applications.

PCB status codes indicate the results of a GCMD call. The status codes are similar to those that result from a message GN call. A QD status indicates that there are no more segments in the response. A QE status indicates that a GCMD call was issued after a CMD call that did not produce response segments. A blank status ('bb') indicates that a segment was retrieved successfully.

Restrictions

The AIB must specify the I/O PCB for this call.

Any AO application that uses this call must be authorized by the security administrator.

You cannot issue a GCMD call from a CPI-C driven application program.

This call is not supported in an IFP, or non-message driven BMP.