Checking CONVDATA fields and the conversation state

Most of the information supplied by the CONVDATA fields can also be obtained from the conversation state. However, you must also check CDBERR and CDBERRCD.

For example, if after a GDS SEND INVITE WAIT or a GDS RECEIVE command has been issued, the conversation is in receive state (state 5), only CDBERR indicates that the partner transaction has sent a GDS ISSUE ERROR. This is illustrated in Figure 1 and Figure 2.

It should be noted that the state tables provided contain not only conversation states and commands issued, but also relevant CONVDATA field settings. The order in which these fields are shown provides a sensible sequence of checks for an application.

Figure 1. Checking the outcome of a GDS RECEIVE command
* ...
* Check return code from RECEIVE
NC WRETC,WRETC
BNZ BADRET Request-related error, analyze
* ... Request successful
NC CDBERR,CDBERR
BNZ ERROR Error indicated, analyze
* ... No errors, check state
CLC WSTATE,DFHVALUE(SYNCFREE)
BE OKSYNFR Partner issued SYNCPOINT and LAST
CLC WSTATE,DFHVALUE(SYNCRECEIVE)
BE OKSYNRC Partner issued SYNCPOINT
CLC WSTATE,DFHVALUE(SYNCSEND)
BE OKSYNSE Partner issued SYNCPOINT and INVITE
CLC WSTATE,DFHVALUE(CONFFREE)
BE OKCONFR Partner issued CONFIRM and LAST
CLC WSTATE,DFHVALUE(CONFRECEIVE)
BE OKCONRC Partner issued CONFIRM
CLC WSTATE,DFHVALUE(CONFSEND)
BE OKCONSE Partner issued CONFIRM and INVITE
CLC WSTATE,DFHVALUE(FREE)
BE OKFREE Partner issued LAST
CLC WSTATE,DFHVALUE(SEND)
BE OKSEND Partner issued INVITE
CLC WSTATE,DFHVALUE(RECEIVE)
BE OKRECV Processing for receipt of data
* (including CDBCOMPL for incomplete data)
B LOGICERR Logic error, should never happen
* ...
ERROR DS 0H
* Error indicated
CLC WSTATE,DFHVALUE(ROLLBACK)
BE ERRRLBK ROLLBACK received
CLC WSTATE,DFHVALUE(FREE)
BE ERRFREE ISSUE ABEND & TERMERR received,
* reason in CDBERRCD
CLC WSTATE,DFHVALUE(RECEIVE)
BE ERRRECV ISSUE ERROR received,
* reason in CDBERRCD
B LOGICERR Logic error, should never happen
* ...
BADRET DS 0H
* ... Examine RETCODE for source of error
* ...
WSTATE DS F
WRETC DS XL6
WCDB DS 0CL24
COPY DFHCDBLK
* ...
Figure 2. Checking the outcome of a GDS SEND INVITE WAIT command
* ...
* Check return code from SEND INVITE WAIT
NC WRETC,WRETC
BNZ BADRET Request-related error, analyze RETCODE
* ... Request successful
NC CDBERR,CDBERR
BNZ ERROR Error indicated, analyze state
* ... No errors, check state
CLC WSTATE,DFHVALUE(RECEIVE)
BE OKRECV Processing for receipt of data
* (incl. CDBCOMPL for incomplete data)
B LOGICERR Logic error, should never happen
* ...
ERROR DS 0H
* Error indicated
CLC WSTATE,DFHVALUE(ROLLBACK)
BE ERRRLBK ROLLBACK received
CLC WSTATE,DFHVALUE(FREE)
BE ERRFREE ISSUE ABEND & TERMERR received,
* reason in CDBERRCD
CLC WSTATE,DFHVALUE(RECEIVE)
BE ERRRECV ISSUE ERROR received,
* reason in CDBERRCD
B LOGICERR Logic error, should never happen
* ...
BADRET ... Examine RETCODE for source of error
* ...
*
WSTATE DS F
WRETC DS XL6
WCDB DS 0CL24
COPY DFHCDBLK
* ...


dfhp623.html | Timestamp icon Last updated: Monday, 5 June 2017