IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

CICS commarea usage


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Fri Dec 07, 2012 2:56 pm
Reply with quote

Hi All,

i am new to CICS programs in real time.

In my shop most of the CICS programs are using/sharing the same commarea. its length is PIC X(4096) and there are multiple record layouts in this commarea.now my question is while linking the program
like below how can i find which record is being used??

Code:
EXEC CICS LINK             
     PROGRAM('ABCD1234')   
     COMMAREA(DFHCOMMAREA) 
     LENGTH(COMMAREA-LENGTH)
END-EXEC
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Dec 07, 2012 3:16 pm
Reply with quote

Quote:
CICS programs are using/sharing the same commarea


What is that could you please explain?? icon_question.gificon_rolleyes.gif
Back to top
View user's profile Send private message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Fri Dec 07, 2012 3:20 pm
Reply with quote

well i know using the commarea programs will exchange the data in CICS region. But in my case commarea defined has multiple record structures and i want to know which record structure is used while calling the other programs.

Hope i am clear
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2012 3:26 pm
Reply with quote

You may be clear or not, but you have not understood how it works, or, by implication, how "linkage" between programs occurs in Cobol or in any other mainframe language.

Do some research on that, it is necessary for you. There is stuff here, probably stuff "out there" on the web, but I'd guess lots there would be wrong.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2012 8:34 pm
Reply with quote

Hello,

Quote:
i want to know which record structure is used while calling the other programs.
I suspect the entire commarea is named in the call and in the called module.

The calling module has to put the data in the record structure that the called module is coded to reference.
Back to top
View user's profile Send private message
Peter cobolskolan

Active User


Joined: 06 Feb 2012
Posts: 104
Location: Sweden

PostPosted: Sat Dec 08, 2012 1:45 pm
Reply with quote

Finding out which layout is used, is purely programming logic.
I suggest you look more closely to the layout of the commarea and I assume you find some redefines, to cater for different layouts. In front of the redefines ther should(could) be a common indicator to tell you the type of record in the commarea.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Dec 09, 2012 6:00 am
Reply with quote

If the LINKed-to program is an existing, working, program, it will be using the correct record-layout for that program.

If it is a new program, the spec will say which record-layout to use.

CICS knows nothing about the record-layouts as it is executing the LINK, or at any time. All CICS is doing is passing an address to the LINKed program from the LINKing program.

Items referenced immeadiately before the LINK will likely be from the record-layout the LINKed-to program uses, as Dick has said.

As Peter indicates, there should be "something" somewhere in the record-layout which indicates the data that is in the commarea at the time, and therefore the record-layout which correctly maps that data (not to CICS, but to humans). CICS does not know about this, and it is not mandatory to have, just very, very sensible.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top