Extracting Return Codes
If you want the Return Code from the processed IBM® Connect:Direct® command, you must use the extract feature. This feature enables you to extract certain UICB fields after IBM Connect:Direct command execution.
DGADCHLA specifies either the first three required parameters or all eight parameters which include these parameters related to return codes. If an incorrect number of parameters is passed, DGADCHLA issues an error message and assigns a return code of 20. Processing cannot occur during this time.
|EXTSTRLN (fourth parameter)||The UICB extract string.The user-supplied application must set up an extract
string identifying the UICB fields to extract. The string consists of a halfword length field
containing the length of the extract string (excluding the itself halfword length field), followed
by the first UICB field to extract, a space, the second UICB field to extract, a space, and so
A sample extract string follows:
You can only specify the UICB fields listed in the extract string. If you encounter an invalid keyword in the string, the extract routine terminates execution, and no more information is extracted. The application is informed of the error by means of the EXTRC, EXTMSG, and INVALKEY parameters. If field 6 of the OUTSPECS parameter is set to Y, the extract string is written to the file defined by DMPRINT.
|EXTAREA (fifth parameter)||Where the UICB extracted information is placed. The application is responsible for ensuring that the area is large enough to accommodate the information requested by the extract string. If field 7 of OUTSPECS is set to Y, the extract string is written to the file defined by DMPRINT. The following shows how to calculate required storage for the extract area necessary for the extract string in the figure shown for the EXTSTRLN parameter.|
|EXTRC (sixth parameter)||A 4-byte binary field containing the extract feature return code.|
|EXTMSG (seventh parameter)||An 8-character field containing an 8-character message ID from the extract feature.|
|INVALKEY (eighth parameter)||An 8-character field containing an invalid extract string keyword. DGADCHLA relays the location of the extract string error to the application in this parameter. This field contains the invalid item in the extract string if EXTRC is nonzero.|
The following table shows how to calculate required storage for the extract area necessary for the extract string in the figure shown for the EXTSTRLN parameter:
|UICB Field||Data Definitions||Storage|
|UITMPDDN||Character length of 8||8 bytes|
|UIMSGID||Character length of 8||8 bytes|