Accessing the API Module (DGAQ012)

Procedure

Access the API by linking to program DGAQ012 within your CICS program/transaction as follows.
EXEC  CICS LINK PROGRAM('DGAQ012') COMMAREA(Q012COMM)          +
               LENGTH(Q012CMLH)

The COMMAREA Q012COMM is defined by macro DGAQCA12 in $CD.SDGASAMP and is also provided in $CD.SDGASAMP. A COBOL version of this record layout is provided as member DGAQAPIC in the sample library. A brief description of each of the fields follows:

Field Assembler Directive Format Description
Q012CMDA DS XL4 Full word containing the address of the command to be issued to IBM® Connect:Direct®. The command must be in the following format:
CMDLEN DS H
Length of CMDTEXT that IBM Connect:Direct recognizes, not including length of CMDLEN.
CMDTEXT DS Clx
Command text
Q012RETC DS XL4 Return code received after the command is invoked.
  • 0: request completed successfully
  • 1: C:D-CICS interface level error
  • 2: C:D-CICS node level error
  • 3: C:D-CICS signon level error
  • 5: invalid COMMAREA or command passed to CICS API
  • 8 and above: unsuccessful request
Q012TDCT DS XL4 TDEXIT ITEM COUNT. The field contains the number of records received from the IBM Connect:Direct DTF.

Q012CMDA is the only required parameter you must set before the EXEC CICS LINK to DGAQ012. For optimum performance, follow the example of DGAQ247 and initialize all fields before linking to DGAQ012.

Any output generated by issuing the command is returned in a temporary storage queue. Your terminal ID is displayed as the last four characters in the unique TS queue name.