Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COMMAREA and CHANNELS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
menonkiran

New User


Joined: 24 Apr 2016
Posts: 2
Location: India

PostPosted: Tue Apr 04, 2017 8:14 am    Post subject: COMMAREA and CHANNELS
Reply with quote

Hello All,
Is it possible to pass data from one CICS program to another (using LINK statement) having both COMMAREA as well as a CHANNEL.

The reason why we are exploring this option is due to the fact that the called program could be called from more than one calling program and we want to make sure that the called program is reading from the right channel and we were thinking of passing the channelname via the COMMAREA from the calling program.

Please do let me know your thoughts.

Thanks
kkm
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8132
Location: East Dubuque, Illinois, USA

PostPosted: Tue Apr 04, 2017 8:41 am    Post subject: Reply to: COMMAREA and CHANNELS
Reply with quote

The syntax diagram in the Application Programming Reference manual indicates you may have either a COMMAREA or a CHANNEL option on your RETURN / LINK / ... command, but not both. The Application Programming Guide manual talks about replacing COMMAREA with CHANNEL. The V5.4 Beta Developing Applications manual specifically states that COMMAREA and CHANNEL are mutually exclusive. It is not clear from these manuals what the impact is on the subprogram but based on the fact that the calling program cannot have both COMMAREA and CHANNEL, I suspect there may be issues with attempting to use both in the subprogram.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 381
Location: USA

PostPosted: Tue Apr 04, 2017 11:30 am    Post subject: Reply to: COMMAREA and CHANNELS
Reply with quote

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.

.
Back to top
View user's profile Send private message
menonkiran

New User


Joined: 24 Apr 2016
Posts: 2
Location: India

PostPosted: Wed Apr 05, 2017 10:12 am    Post subject:
Reply with quote

Thanks Rahul, I have tried it and it meets my requirements.

Thanks Robert. For my knowledge, i will try to test with both the options and see what happens
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1740
Location: NY,USA

PostPosted: Fri Apr 07, 2017 2:58 am    Post subject:
Reply with quote

If you bother to read go through this reference then you will understand it.Transferring data between programs using channels
This is what you need to know specifically which RahulG31 made it more easier already.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Porting to Channels and Containers yugendran CICS 3 Thu Nov 12, 2015 1:02 pm
No new posts Performance testing - Channels and Co... madhand Testing & Performance analysis 1 Tue Jan 20, 2015 10:14 am
No new posts Problem creating cluster channels Midhun Mohandas Java & MQSeries 4 Wed May 28, 2014 3:34 pm
No new posts CICS commarea usage Bill Woodger CICS 6 Fri Dec 07, 2012 2:56 pm
No new posts Easytrieve Print Channels RickRock CA Products 1 Wed Feb 01, 2012 2:09 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us