ICMD call

An Issue Command (ICMD) call enables an automated operator (AO) application program to issue an IMS command and retrieve the first command response segment.

Format

Read syntax diagramSkip visual syntax diagramICMDaibi/o area

Parameters

aib
Specifies the application interface block (AIB) for this call. This parameter is an input and output parameter.
These 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.
AIBOALEN
I/O area length. This field must contain the length of the I/O area specified in the call list. This field is not changed by IMS.
AIBOAUSE
Length of data returned in the I/O area. This parameter is an output parameter.

Your program must check this field to determine whether the ICMD call returned data to the I/O area. When the only response to the command is a DFS058 message indicating that the command is either in progress or complete, the response is not returned.

When partial data is returned because the I/O area is not large enough, AIBOAUSE contains the length required to receive all of the data, and AIBOALEN contains the actual length of the data.

i/o area
Specifies the I/O area to use for this call. This parameter is an input and output parameter. The I/O area should be large enough to hold the largest command that is passed from the AO application program to IMS, or the largest command response segment that is passed from IMS to the AO application program. If the I/O area is not large enough to contain all the data, IMS returns partial data.

Usage

ICMD enables an AO application to issue an IMS command and retrieve the first command response segment.

When using ICMD, put the IMS command that is to be issued in your application program's I/O area. After IMS has processed the command, it returns the first segment of the response message to your AO application program's I/O area. To retrieve subsequent segments (one segment at a time) use the RCMD call.

Some IMS commands that complete successfully result in a DFS058 message indicating that the command is complete. Some IMS commands that are processed asynchronously result in a DFS058 message indicating that the command is in progress. For a command entered on an ICMD call, neither DFS058 message is returned to the AO application program. In this case, the AIBOAUSE field is set to 0 to indicate that no segment was returned. So, your AO application program must check the AIBOAUSE field along with the return and reason codes to determine if a response was returned.

Related reading: For more information on the AOI exits, see IMS Version 15.3 Exit Routines.

The following table shows, by IMS environment, the types of AO application programs that can issue ICMD. ICMD is also supported from a CPI-C driven program.

Table 1. ICMD support by application region type
  Application region type IMS environment
DBCTL DB/DC DCCTL
DRA thread Yes Yes N/A
BMP (nonmessage-driven) Yes Yes Yes
BMP (message-driven) N/A Yes Yes
MPP N/A Yes Yes
IFP N/A Yes Yes

See IMS Version 15.3 Operations and Automation for a list of commands that can be issued using the ICMD call.

Restrictions

Before issuing ICMD, a CPI-C driven program must issue an allocate PSB (APSB) call.