Author: RahulG31
Subject: Reply to: COMMAREA and CHANNELS
Posted: Tue Apr 04, 2017 11:30 am (GMT 5.5)
If you search 'CICS Channels and Containers' on Google, then you'll find lots of useful links. If you go through any of them then you'll find that when you link you can pass the CHANNEL and then in your called program you can do ASSIGN CHANNEL to know which channel was passed. You won't find the concept of passing a channel name via commarea, that's weird.
If you have 2 programs as PROGA and PROGB calling a common program PROG1 with different channels as 'CHANNEL1' and 'CHANNEL2', then:
PROGA:
PROGB:
PROG1:
WS-CURR-CHANNEL will have the value of 'CHANNEL1' if linked from PROGA and it will have a value of 'CHANNEL2' if linked from PROGB.
.
Subject: Reply to: COMMAREA and CHANNELS
Posted: Tue Apr 04, 2017 11:30 am (GMT 5.5)
If you search 'CICS Channels and Containers' on Google, then you'll find lots of useful links. If you go through any of them then you'll find that when you link you can pass the CHANNEL and then in your called program you can do ASSIGN CHANNEL to know which channel was passed. You won't find the concept of passing a channel name via commarea, that's weird.
If you have 2 programs as PROGA and PROGB calling a common program PROG1 with different channels as 'CHANNEL1' and 'CHANNEL2', then:
PROGA:
Code: |
EXEC CICS LINK PROGRAM('PROG1') CHANNEL('CHANNEL1') |
PROGB:
Code: |
EXEC CICS LINK PROGRAM('PROG1') CHANNEL('CHANNEL2') |
PROG1:
Code: |
EXEC CICS ASSIGN CHANNEL(WS-CURR-CHANNEL) END-EXEC. |
WS-CURR-CHANNEL will have the value of 'CHANNEL1' if linked from PROGA and it will have a value of 'CHANNEL2' if linked from PROGB.
.