Module 3: CICS Transactions and Commands
CICS Command Categories
CICS commands are grouped into categories by the kind of service they provide. Knowing the categories helps you guess where any command belongs.
The main categories
- Terminal control — talk to the screen: SEND, RECEIVE, SEND MAP, RECEIVE MAP, CONVERSE.
- File control — VSAM record access: READ, WRITE, REWRITE, DELETE, STARTBR, READNEXT, READPREV, ENDBR, UNLOCK.
- Program control — call and transfer between programs: LINK, XCTL, RETURN, LOAD, RELEASE.
- Interval control — time and delayed work: ASKTIME, FORMATTIME, START, CANCEL, DELAY, RETRIEVE.
- Storage control — working memory: GETMAIN, FREEMAIN.
- Task control — synchronization: SUSPEND, ENQ, DEQ.
- Transient data — queues to destinations: WRITEQ TD, READQ TD, DELETEQ TD.
- Temporary storage — scratchpad queues: WRITEQ TS, READQ TS, DELETEQ TS.
How to remember them
- Terminal = talk to the user’s screen; File = read and write records.
- Program = call another program (LINK) or transfer to it (XCTL); Interval = anything with time.
- Storage = get and free memory inside your task; Task = locks and waiting.
- Transient data queues go somewhere (a destination); Temporary storage queues are just a scratchpad for your programs.
- When you meet a new command, ask “what resource does it touch?” — the answer names its category.
- One example from four different categories:-
*--- One example from four different categories ---* *--- Terminal control: show a screen ---* EXEC CICS SEND MAP('MNTMAP1') MAPSET('MNTSET1') ERASE END-EXEC. *--- File control: read a VSAM record ---* EXEC CICS READ FILE('CUSTMAS') INTO(CUST-REC) RIDFLD(CUST-NO) RESP(WS-RESP) END-EXEC. *--- Program control: call another program ---* EXEC CICS LINK PROGRAM('CALC-TAX') COMMAREA(TAX-AREA) END-EXEC. *--- Temporary storage: keep scratch data ---* EXEC CICS WRITEQ TS QUEUE('SCRATCH') FROM(WS-DATA) LENGTH(100) ITEM(WS-ITEM) END-EXEC.
