One of my colleague working for the past few years on CICS. I asked him what is the difference, and, he confused why and which scenario we need to give all the above in a CICS program.
You can learn quickly here:
In realty, only one statement is enough in a CICS program – no need to give all in a program. I am already described in my earlier posts that CICS supports only VSCobol II.
EXEC CICS RETURN Transid(name) Commarea(data-area) Length(data=value) END-EXEC
It returns control to CICS. This will be used in both main and sub program. The inside parameters are optional. If we wi give transid, then, we need to give all three.
- Commarea is optional in main pgm. If we give it in a sub pgm, data will be available to main pgm
- Two kinds of errors will occur INVREQ, NOAUTH with Return command.
- EXIT PROGRAM ==> it will used only in with VS Cobol II sub program-with CICS or without. Control will pass to next higher logical level/called program.
- STOP RUN ==>it will be used only in VS Cobol II main program -with CICS or without. Control will pass to CICS.
- GOBACK==> This will be used in both main and sub programs with or without CICS. Control will pass to next higher logical level or CICS.