Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Memory allocation issue resulting in protecction exception

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Mon Jan 03, 2011 12:08 pm    Post subject: Memory allocation issue resulting in protecction exception
Reply with quote

Few months back I had faced issue regarding an IMS MPP. The MPP was representing an IMS transaction and in turn MPP was calling numerous programs which were having huge working storages. All of the working storages were adding up to round about 48M of space and the IMS online region limit was set to 6400K (due to some reason). So whenever the memory requirement was exceeding the 6.4M the program use to abend. Please note that all the calls made from MPP were dynamic. So in some of the "memory intensive" logical flows (where most of the modules were called), the program use to abend for rest of the flows the program use to work fine.

Now question here is, in order to satisfy the functionality we had no option but to have huge working storages. But like CICS, cant we allocate the memory space as and when we require, use it and then release it, in IMS or any non-CICS env?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Jan 03, 2011 2:19 pm    Post subject:
Reply with quote

you wrote a large (an somewhat incorrect) post about COBOL CANCEL in another thread,
hopefully you now understand CANCEL; why can not that be employed?
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Mon Jan 03, 2011 2:36 pm    Post subject:
Reply with quote

As a matter of fact we did employ it (to an extent). But did not work in this particular case. But there is a dependecy of data from one module to another module. So even if we cancel all the modules those we can still we are well above the region limit. And that is reason why I want to know whether there is way of allocating memory run-time (like CICS GETMAIN)?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Mon Jan 03, 2011 3:30 pm    Post subject:
Reply with quote

why try to allocate memory when you have already exceeded your limit?

and yes, the LanguageEnvioronment has methods for allocating memory,
a 'batch' getmain.

Here is a link to the LE Manuals

Here is a link to the LE Overview
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Mon Jan 03, 2011 3:47 pm    Post subject: Reply to: Memory allocation issue resulting in protecction e
Reply with quote

Quote:
Memory allocation issue resulting in protection exception


memory allocation issues will never result in protection exception
the might result in getmain/freemain related abends
( 804,878,704,...., add a few more)

protection exception will spring from misuse of allocated storage!
( or any storage, really )
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Mon Jan 03, 2011 5:46 pm    Post subject:
Reply with quote

The protection exception is not coming while allocating memory. It is coming while accessing it. Once the already allocated memory access exceed the adreess 6.4M (region set limit) then it fails with protection exception.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Mon Jan 03, 2011 5:54 pm    Post subject: Reply to: Memory allocation issue resulting in protecction e
Reply with quote

Quote:
Once the already allocated memory access exceed the adreess 6.4M (region set limit)


please be so kind to explain how You were able to allocate memory/storage beyond the region set limit
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Mon Jan 03, 2011 8:55 pm    Post subject:
Reply with quote

Hello,

Quote:
Now question here is, in order to satisfy the functionality we had no option but to have huge working storages.
One option would be to write the data into a "work" database table and re-read it as needed. . .
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Tue Jan 04, 2011 8:59 am    Post subject:
Reply with quote

Hi Enrico,

You are right. As and when the programs were dynamically called the memory was being added. So at the time when it exceeded the 6.4M limit it was failing.

It was resulting in U4038 abend and in fault analyzer it was showing as protection exception.
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Wed Jan 05, 2011 10:27 am    Post subject:
Reply with quote

Hi Dick,

I have found two functions CEEGTST and CEEFRST which can allocate and free (respectively) the heap storage.

We will try to use them and see whether it works or not.

Thanks for the info.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us