This illustration shows how the callable Finalist CICS linkage works.
Figure 1. Callable Linkage
- Your program COMMAREA contains user data with additional data added to the end for use by Finalist CICS.
- XCTL 1 passes the full COMMAREA to LPWN511C.
- LPWN511C formats a Windows COMMAREA to pass to Windows (LPCF). The rest of the COMMAREA is saved in a temporary storage queue. The TS Queue is named LPCFxxxx where "xxxx"=EIBTRMID. LPWN511C saves the transaction code and changes it to LPCF. The Windows COMMAREA is passed to Windows in XCTL 2.
- Finalist CICS (LPCF in the previous figure) runs as usual until you press Clear ending CICS processing. Prompted by a flag passed by LPWN511C, CICS XCTLs to LPWN512C instead of returning to CICS. The CICS COMMAREA is passed in the XCTL.
-
LPWN512C performs the following:
- Reads and deletes the temporary storage queue
- Merges the CICS CALLAREA into your COMMAREA
- Restores your transaction code
- XCTL's to a program named by you
- This program can be the same one that passed control to CICS or a different program. This is a user decision. The user program (Program B in the previous figure) is responsible for knowing control is coming from CICS.
- If the field PASSPGM in the Pass Control Block is not filled in by your application prior to calling LPW511C, abend LP71 occurs when Finalist CICS ends and attempts the XCTL.