Multiple links to the same server region
When a client program issues a LINK command with the SYNCONRETURN option, the mirror transaction terminates as soon as control is returned to the client program. It is therefore possible for the client program to issue a subsequent LINK command to the same server region.
However, when a client program issues a LINK command without the SYNCONRETURN option, the mirror transaction is suspended pending a sync point request from the client region. The client program can issue subsequent LINK commands to the same server region, as long as the SYNCONRETURN option is omitted and the TRANSID value is not changed. A subsequent LINK command with the SYNCONRETURN option, or with a different TRANSID value, is unsuccessful unless it is preceded by a SYNCPOINT command.
EXEC CICS LINK PROGRAM('PGA') SYSID(SERV)
EXEC CICS SYNCPOINT
EXEC CICS READQ TS QUEUE('RQUEUE') SYSID(SERV)
EXEC CICS LINK PROGRAM('PGB') SYSID(SERV) TRANSID(TRN1)
The last LINK command fails if, for example, MROLRM=YES is specified in the CICS® server region (SERV). This is because the mirror used for the READQ TS command is still around. For this example sequence of commands to work, the client program must issue a SYNCPOINT after the READQ TS command. Alternatively, you could set the MROLRM system initialization parameter to NO in the server region. For detailed information about using DPL and function shipping requests in the same program, see Programming considerations for distributed program link.
These errors are indicated by the INVREQ and PGMIDERR conditions.
On the INVREQ condition, an accompanying RESP2 value of 14 indicates that a sync point is necessary before the failed LINK command can be successfully attempted. A RESP2 value of 15 indicates that the TRANSID value is different from that of the linked mirror transaction. A RESP2 value of 16 indicates that a TRANSID value of spaces (blanks) was specified on the LINK command. A RESP2 value of 17 indicates that a TRANSID value of spaces (blanks) was supplied by the dynamic routing program.
On the PGMIDERR condition, an accompanying RESP2 value of 25 indicates that the dynamic routing program rejected the link request.