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

Linkage Section in CICS program


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

New User


Joined: 03 Mar 2010
Posts: 3
Location: Mumbai

PostPosted: Wed Mar 03, 2010 2:16 pm
Reply with quote

I have a 4 set of programs say A, B, C & D. Program A is a COBOL FSA program which invokes B which is a pure CICS program using LINK command & passes the data using WS section of A.

B in turn invokes C which is a COBOL FSA(a propreitry arhitecutre) program. Data is transferred from B to C via VCOM(similar to DFHCOMMAREA for CIC & is present in linkage section of both calling & called pgm). VCOM present in linkage of both B & C.

B also invokes D which is an CICS MQ program. Data is transferred using another WS section of B & received in D in DFHCOMMAREA in linkage. No VCOM present here.

So in summary we have following:
1. A passes data to B via WS var whic goes to DFHCOMMAREA of B.
2. B has DFHCOMMAREA coming from A & VCOM to be passed to C. Both are present in linkage section of B at diferent 01 levels. B also passes data to D via WS vars.
3. C is a COBOL FSA program which has VCOM in its linkage section to receive data from B.
4. D is a MQ CICS program which has DFHCOMMAREA in its linkage section to receive data from B.

Now my question is when my program B is being executed & it calls C & LINKS to D for further processing & then returns back, is it possible that the data in linkage area of program B may interfere anywhere with each other as C & D has only 1 area each in it.

Please let me know as I need to know this ASAP before my programs go live into production this weekend.

Let me know if above sounds confusing & need more explaination. Thanks in advance to all for help.

Regards,
Vishal Laddha
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 03, 2010 2:49 pm
Reply with quote

Quote:
Please let me know as I need to know this ASAP before my programs go live into production this weekend.


You should realize that people answer on their own time and at no charge

if You have time issues, it would be best for Your organization to look for paid consultancy

by the way what happened during the testing phase?
everything should have been discovered there! ( that' s what testing is about )
what issues were decided/analyzed at design time ?
Back to top
View user's profile Send private message
laddhavishal

New User


Joined: 03 Mar 2010
Posts: 3
Location: Mumbai

PostPosted: Wed Mar 03, 2010 3:05 pm
Reply with quote

The testing has gone fine but we had a problem earlier where hecode worked in testing region but not in production. It was just that during a peer review we had some doubts raised over such a design & hence thought of putting it up to be sure that design will not have long standing impacts after going in production.

In our earlier case ,we had the program B itself as a MQ CICS program calling a COBOL FSA program. It tested fine till UAT but bombed in production & we realised that this is not allowed.

We have now removed the MQ part from B & created a new pgm D to do the MQ processing & link to it from B when required. B is now a CICS program with no MQ.

I do realise that ppl will repond when theyhave time. I just highlighted the time constraint to get quick replies if possible by anyone understanding my urgency.

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

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Mar 03, 2010 3:50 pm
Reply with quote

Hi Vishal,

Please note that I have no idea what FSA COBOL program is or how different VCOM is from DFHCOMMAREA. Assuming it to basic COBOL and DFHCOMMAREA respectively.... icon_cool.gif

Quote:
B has DFHCOMMAREA coming from A & VCOM to be passed to C. Both are present in linkage section of B at diferent 01 levels. B also passes data to D via WS vars
The VCOM for ProgramC is defined in the Linkage Section as per this statement. Wouldn't that create an problem... If my understanding is correct, if you declare just in the Linkage section no memory is acquired for the area...

Quote:
The testing has gone fine but we had a problem earlier where hecode worked in testing region but not in production
If you are quickly trying to solve this production problem then I would suggest u post what issue you had in the prodcution... though i do appreciate the fact that you are trying to solve the problem on your own.. icon_wink.gif ....

Quote:
I do realise that ppl will repond when theyhave time. I just highlighted the time constraint to get quick replies if possible by anyone understanding my urgency
As long as you dont have your expectations high it should be okay... Enrico mentioned it since you are a new member to the forum..
Back to top
View user's profile Send private message
laddhavishal

New User


Joined: 03 Mar 2010
Posts: 3
Location: Mumbai

PostPosted: Wed Mar 03, 2010 4:19 pm
Reply with quote

I will try to make things simpler here. Lets forget for now what FSA COBOL is. This is how the programs look like
PGM A
WS Section
WS-A

Linkage Section
01 Link-AA

PGM B
WS section
WS-B

Linkage Section
01 LINK BA
01 LINK BB

PGM C
Linkage Section
01 LINK CA

PGM D
Linkage Section
01 LINK DA

Now summary of calls is as below:
1. PGM A LINKS to PGM B & passes WS-A. PGM B receives this in say LINK BA.
2. PGM B CALLS to PGM C & passes LINK BB. PGM C receives it in LINK CA.
3. PGM B LINKS to PGM D & passes WS-B. PGM D receives it in LINK DA.

Now will there be any issue in B since it has 2 major linkage vars in it whereas the called pgms has only 1.

Here the basis of design is the below assumption.
1. Since B is calling C, hence DFHCOMMAREA should not come into picture & only VCOM or LINK BB to LINK CA should come into picture.
2. Also since B LINKS to D, VCOM should not come into picture & only DFHCOMMAREA should come into picture.

Thanks to all for your help & guidance.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Mar 03, 2010 5:05 pm
Reply with quote

Hi Vishal,

What i was pointing out is ....

As per my understanding, the LINK BB you have declared is in LINKAGE section basically means no memory is acquired but only referenced.. When u access these fields most likely you should get an ASRA abend unless memory is acquired...

A snapshot from the manuals for your reference ...
Code:
------------------------------------------------------------------------------------------
| CALL . . . BY REFERENCE  | To pass the address of          | Any changes made by the   |
| ADDRESS OF identifier    | identifier to a called program, | subprogram to the address |
|                          | where identifier is an item in  | affect the address in the |
|                          | the LINKAGE SECTION             | calling program.          |
------------------------------------------------------------------------------------------


Is this part of the code something newly added or was it already working fine in the production code before...
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Mar 04, 2010 4:07 am
Reply with quote

If you've tested your recent changes, then whats the problem ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 04, 2010 4:41 am
Reply with quote

As your question is stated, you are asking about a non-issue. Programs called by program B have access to whatever data is passed via the call mechanism -- whether that is one 01 level, two 01 levels, or thirty-seven 01 levels. The number doesn't matter as long as there is addressability to the memory.

And, as Binop B said, that is where your problem is. Unless you are doing something to establish memory for your LINK-BB 01 level in program B (such as using EXEC CICS GETMAIN and SET ADDRESS), any references to any byte of LINK-BB (whether in program B, or C, or D, or A, or any other program) will either produce unexpected results or cause a storage exception and transaction abend. From the COBOL Language Reference manual section 5.1.4 on Linkage Section:
Quote:
Record description entries and data item description entries in the linkage section provide names and descriptions, but storage within the program or method is not reserved because the data area exists elsewhere.
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
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
Search our Forums:

Back to Top