LU 6.2 API Application Programmer's Reference Guide (30294-90008)

184 AppendixB
Sample Programs
CICS Program (PL/I)
ELSE DO;
EXEC CICS DEQ RESOURCE(RSC) LENGTH(6);
L_ERR: EXEC CICS SEND FROM(MISC_ERROR) INVITE WAIT;
END;
END;
END RCV_LOOP;
/* If the partner TP called MCConfirm, */
/* respond with MCConfirmed (EXEC CICS ISSUE CONFIRMATION). */
L_BYE:
IF ((SYNC = 1) & (CONFIRM_REQ = '1'B)) THEN
DO;
EXEC CICS ISSUE CONFIRMATION;
CONFIRM_REQ = '0'B;
END;
/* If the remote TP deallocated, deallocate the local conversation. */
IF DFHEIBLK.EIBFREE = HIGH(1) THEN
DO;
EXEC CICS RETURN;
END;
/* If the key sent by the remote TP is not in the database, */
/* report an error, call MCPrepToRcv (INVITE WAIT), and */
/* return to the receive loop to receive another record. */
L_NFD:
DO;
EXEC CICS DEQ RESOURCE(RSC) LENGTH(6);
EXEC CICS SEND FROM(NOT_FOUND) INVITE WAIT;
GOTO RCV_LOOP;
END;
END S027;