View previous topic :: View next topic
|
Author |
Message |
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Quote: |
CICS programs are using/sharing the same commarea |
What is that could you please explain?? |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|