To migrate two programs which use a COMMAREA on a LINK command
to exchange a structure, change the instructions shown in Table 1.
Table 1. Migrating LINK commands that
pass COMMAREAsProgram |
Before |
After |
PROG1 |
EXEC CICS LINK PROGRAM(PROG2)
COMMAREA(structure)
|
EXEC CICS PUT CONTAINER(structure-name)
CHANNEL(channel-name)
FROM(structure)
EXEC CICS LINK PROGRAM(PROG2)
CHANNEL(channel-name)
...
EXEC CICS GET CONTAINER(structure-name)
CHANNEL(channel-name)
INTO(structure)
|
PROG2 |
EXEC CICS ADDRESS
COMMAREA(structure-ptr)
...
RETURN
|
EXEC CICS GET CONTAINER(structure-name)
INTO(structure)
...
EXEC CICS PUT CONTAINER(structure-name)
FROM(structure)
RETURN
|
Note: In the COMMAREA example, PROG2, having put
data in the COMMAREA, has only to issue a RETURN command to return the data
to PROG1. In the channel example, to return data PROG2 must issue a PUT
CONTAINER command before the RETURN.