|
View previous topic :: View next topic
|
| Author |
Message |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
Dear all,
We had a very peculiar case today where two users were using the same transaction with the same data. With the first user it was working but the second user had problems. We found that the program was issuing a GETMAIN for commarea (DFHCOMMAREA) without doing a FREEMAIN at the end. With the FREEMAIN addition looks it is working. Can this be the solution of our problem?
Thank you in advance. |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
| The answer to this problem is that it was indeed the lack of freemain for the commarea. Please note that you have to do the freemain only if the getmain above is successful. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| Ziko13 wrote: |
| Please note that you have to do the freemain only if the getmain above is successful. |
Is there anybody in this world who may doubt it? |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
Dear all,
Unfortunately this problem persists. It is working in the test region but sometimes it is failing in production with the same data. Test is a mirror or production. We saw today that these programs are not working with DFHCOMMAREA but there is a special copybook in the linkage section with a corresponding WS area. The field we want to pass is the page number so we put that in the end and decreased the filler area after that. Again it is working in test. Any ideas about production ? Is there a reason for this to fail again? I can post my code if needed. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
re: sometimes it is failing in production with the same data
<speculation>
Likely, you are testing without an adequately busy enough workload. Or perhaps there is a rarely used transaction that is not being driven in the test environment.
When I hear of lost storage, I think my own experience where the case was of two parallel tasks that did not share the storage correctly. The developer did not use 'compare and swap' assembler instruction correctly to get ownership of a control block.
</speculation> |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
| A misconfiguration in production maybe? Thank you very much for the responce |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
| We uploaded the code during a weekend where only the tester was online but still there were cases where it didnt work. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
The documentation is clear about this: ending the task that issued the GETMAIN will release the acquired memory.
Unless you used the SHARED parameter. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2624 Location: Silicon Valley
|
|
|
|
re: Unless you used the SHARED parameter
I am only somewhat familiar with the normal assembler macros, where the concern is with the SP (subpool) parameter. The default is subpool 0 that is released when the task ends, but you can specify a subpool that will stay even after the task ends. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
| the topic is about a CICS getmain... not a zOS getmain |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
If you want significant help, you have to be more specific and precise.
| Ziko13 wrote: |
Dear all,
Unfortunately this problem persists. It is working in the test region but sometimes it is failing in production with the same data. Test is a mirror or production. |
What "problem" do you have ? What do you mean by failing ?
Do you receive an abend, do you get SOS, do you kill the whole CICS ?
| Ziko13 wrote: |
| We saw today that these programs are not working with DFHCOMMAREA but there is a special copybook in the linkage section with a corresponding WS area. The field we want to pass is the page number so we put that in the end and decreased the filler area after that. |
Where is the GETMAIN in all this ? if you can define a "corresponding WS area", why do you need the extra storage ?
| Ziko13 wrote: |
| I can post my code if needed. |
Yes please. Which GETMAIN do you use (shared or not), how do you manage the address, how do you pass it to the other program, and how the other program use it. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
If you want significant help, you have to be more specific and precise.
| Ziko13 wrote: |
Dear all,
Unfortunately this problem persists. It is working in the test region but sometimes it is failing in production with the same data. Test is a mirror or production. |
What "problem" do you have ? What do you mean by failing ?
Do you receive an abend, do you get SOS, do you kill the whole CICS ?
| Ziko13 wrote: |
| We saw today that these programs are not working with DFHCOMMAREA but there is a special copybook in the linkage section with a corresponding WS area. The field we want to pass is the page number so we put that in the end and decreased the filler area after that. |
Where is the GETMAIN in all this ? if you can define a "corresponding WS area", why do you need the extra storage ?
| Ziko13 wrote: |
| I can post my code if needed. |
Yes please.
Which GETMAIN do you use (shared or not), how do you manage the address, how do you pass it to the other program, and how the other program use it.
Also, programs can be different in the different environments. Do you recompile your programs when moving to prod (for example: running with NOOPT in test for debugging and with OPT(n) in prod for performance) ? |
|
| Back to top |
|
 |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 44 Location: Greece
|
|
|
|
Dear all,
Thank you very much for your willingness to help. The change is now one week in production and stable.
Lessons learned regarding commarea :
1. Always look in the linkage section copybooks for special areas that you can use for transfering data and only if there is none then try allocating DFHCOMMAREA.
2. Never Freemain DFHCOMMAREA. Let CICS handle it.
The above are my own assumptions. You are very welcome to share your opinion for the others. |
|
| Back to top |
|
 |
|
|