A pseudo-conversational CICS program sends a map, ends, and runs again when the user presses a key. The second run reads the screen with RECEIVE MAP, looks at EIBAID to see which key was pressed, checks the fields, and either updates a file or sends the map again with a message. The task does not sit in memory while the user reads the screen.
RECEIVE MAP names the map and the mapset that built the screen. INTO names the symbolic map area generated from the BMS map. RESP keeps the condition in your working storage so you can branch without a HANDLE CONDITION you forgot to pop.
1234567891011EXEC CICS RECEIVE MAP('PAYMAP') MAPSET('PAYSET') INTO(PAYMAPI) RESP(WS-RESP) END-EXEC. IF WS-RESP NOT = DFHRESP(NORMAL) PERFORM SEND-MAPFAIL EXEC CICS RETURN END-EXEC END-IF.
| Key | Typical action |
|---|---|
| DFHENTER | Validate fields and continue |
| DFHPF3 | Leave. RETURN without updating |
| DFHCLEAR | Redisplay a clean map |
| DFHPF7 / DFHPF8 | Page a list if the screen is a browser |
123456789EVALUATE EIBAID WHEN DFHPF3 EXEC CICS RETURN END-EXEC WHEN DFHENTER PERFORM CHECK-FIELDS WHEN OTHER MOVE 'USE ENTER OR PF3' TO MSGO PERFORM SEND-MAP END-EVALUATE.
Symbolic input fields can be empty, low-values, or the wrong picture. Test them before READ UPDATE or REWRITE. Send the same map with the cursor on the bad field and a one-line message. A file update belongs on the path where RESP was NORMAL, EIBAID was Enter, and the fields passed the checks.
12345EXEC CICS RETURN TRANSID(EIBTRNID) COMMAREA(WS-COMMAREA) LENGTH(WS-COMM-LEN) END-EXEC.
EIBTRNID is the transaction the user already typed, so the next Enter starts the same program. The commarea holds whatever the next task must remember. A waiting conversational RECEIVE holds a task and a thread for the whole think time. Return instead.
You slide a form across the counter and walk away. When the person rings the bell (Enter), you come back, read the form, and either fix a box they left blank or file the form. You do not stand at the counter while they hunt for a pen.
1. Terminal input from a BMS map is read with:
2. EIBAID tells you:
3. RETURN TRANSID is used so that:
4. MAPFAIL on RECEIVE means: