Search code examples
cobolmainframecics

CICS Return VS GOBACK


What happened to the Commarea passed by Program A in both of these examples?

Program A does an EXEC CICS LINK to Program B then Program B uses the GOBACK command

Program A does an EXEC CICS LINK to Program B then Program B uses the EXEC CICS RETURN command


Solution

  • See https://stackoverflow.com/a/28056695/1927206.

    Nothing happens to the commarea.

    If B changes it, it is changing the storage that A is aware of.

    Only the address of data is "passed" between programs. Only the original data exists, Program B manipulates the original data. There is no copying of data between CALLing and CALLed programs.

    Separate from what happens to the data (nothing) the two examples you show have identical behaviour. Use the local standards for your site.