CICS working storage



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

CICS working storage

Postby prasad77reddy » Sat Nov 12, 2011 3:22 pm

Program A (CICS LINK) calls B which in turn calls (CICS LINK) C which in turn (COBOL CALL)calls D more than once. Program A is a CICS program that is executed from Java via the CICS transaction Gateway. When called like this, on the second call, program D looses its working storage contents from the first call and this causes issues in execution of the program D.

To test the above programs from within mainframe, we created a clone of A and introduced the pointers and the SET ADDRESS OF statement as the first in the PROCEDURE DIVISION. It runs under a regular CICS transaction and the working storage contents of D are retained between CALLs.

Any ideas as to why is it that we loose the WS in the first scenario?

Any ideas will be appreciated.
prasad77reddy
 
Posts: 2
Joined: Sat Nov 12, 2011 2:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS working storage

Postby BillyBoyo » Sat Nov 12, 2011 5:07 pm

You are describing a complex situation, but all at a very high level.

It might also be the wrong question.

I'm going to ask a question back.

What is the usefulness to you of program D retaining its working-storage values between calls - at least in the sense of multiple use of the same transaction?

Web Page 1 uses your programs, but user goes for a cup of tea whilst system is waiting for a Click. Web Page 2 comes along, uses your program, if program D is relying on previous working-storage settings at least one, and possibily both, web page has a scrambled mix of data.

It is completely normal for CICS to help out in preventing this. The situation that at the moment I would say is wrong is the situation you think that you want.

Have another think, and then explain why you think it desirable that way. Or not. Then if you are stuck fixing it, let us know, and show us some detail.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: CICS working storage

Postby prasad77reddy » Sat Nov 12, 2011 6:42 pm

Thanks for the response Billy Boyo.

I agree that I described the situation at a high level.

The question itself is correct.

The program D is already in production and it opens certain cursors and leaves them open but sets a working storage variable to a certain value indicating that it left the cursor open. On the second call, depending on the values of the variable above, decides to closes the cursor or leave it open.

As for web page 1 and web page 2 situation, won't they run under different CICS task IDs and with each task getting its own WS copy (?!)

Other thing that makes me wonder is, how is program D retaining the WS values when invoked from within mainframe under a different transaction ID? Could this point to transaction level settings such as RELOAD?

I am stuck fixing it.

Please let me know the details I can provide would help get a resolution.
prasad77reddy
 
Posts: 2
Joined: Sat Nov 12, 2011 2:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS working storage

Postby BillyBoyo » Sat Nov 12, 2011 7:30 pm

a CICS program that is executed from Java via the CICS transaction Gateway


I've not done that myself. I can suggest that you become conversant with the capabilities described in the documentation, and see if that gives you a better handle on things.

Do you have different compile/link/bind requirements for the "gateway" from your normal CICS execution version? I'm assuming with the normal one the Call to D is static? So that D is part of loadmodule C? Is that the same with the "gateway"?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post