1829643 Members
1595 Online
109992 Solutions
New Discussion

Cobol 114 error

 
Anthony Goonetilleke
Esteemed Contributor

Cobol 114 error

We are getting the following error

114 Attempt to access item beyond bounds of memory (Signal 11)

After some clib patches we are now getting this error

114 Attempt to access item beyond bounds of memory (Signal 10)

Can anyone shed some light on this?

PS: I always award points for good answers :-)

Minimum effort maximum output!
5 REPLIES 5
Alex Glennie
Honored Contributor

Re: Cobol 114 error

Found some info on the main causes of the original signal 11 error if any help ? :

they seem to tie up with signal 10's main causes ie memory allocation problems.

What version of cobol / OS have you a snippet of code you could post/attach ?

This error typically happens when running Cobol programs that call C programs
or database applications. The first thing to look at is two kernel parameter
settings: maxdsiz and maxssiz. The system default of maxdsiz is usually set
to 16 mg and maxssiz is usually set to 8 mg, this is not enough for large
applications. Try setting maxdsiz to 500 mg and maxssiz to 64 mg. Keep in
mind that you cannot set maxdsiz higher than what swap is configured to.
Changing these parameters will require a re-boot of the system. Re-test the
application after the changes have been made. This should work but not in all
cases, you may need to increase them more or contact the response center for
further investigation.

A second possible cause of this error is when a subscript tries to access an
element of a defined array outside the bounds of that array. For example, if
you have defined a 100 element array called PRICELIST, the statement:
MOVE 1 TO PRICELIST(101)
will cause this error. Always be sure to check the range of a variable before
using it to access an array.

A third possible cause of this error could be due to incorrect linkage
definitions between a calling program and a called module. Each element in the
linkage must be defined the same way in each program and called in the same
order. For example, a main program will use two elements, PARTNAME pic x(10),
and PARTPRICE s9(4).99. If it calls a module as: CALL NEWPROG USING PARTNAME,
PARTPRICE then NEWPROG should have a procedure statement like: PROCEDURE
DIVISION USING PARTNAME, PARTPRICE and have them defined the same way in theLINKAGE section.
Pete Conneely
Advisor

Re: Cobol 114 error

I hope the attached is useful
Pete Conneely
Advisor

Re: Cobol 114 error

...and this.
Jon McDermott
Advisor

Re: Cobol 114 error

I've also seen instances where the 114 error is a side affect of an error within a C module called from a COBOL module, especially if you have your own C modules linked into your own rts.

If you animate your COBOL module, then step through it and find that you are getting the error on a call to a C module, that's a clue. At this point it's either a data mismatch (as discussed in previous posts) or a possible error in the C code.
Keith Hughes_2
Advisor

Re: Cobol 114 error

Anthony,

Does your error appear when running int, gnt or an executable compiled version of the code. Try running under the other versions.

What version of COBOL are you running? Type cobrun to find version.

If you are not on B.12.40 for HPUX 10.20 or B.13.40 for HPUX 11.0 please upgrade as this has solve some RTS 114 errors before.

I am affraid that RTS 114 error is one of the generic errors given to cover a cross section of problems. Some of the problems are solved by upgrading but others can be fixed by small changes in the code or changes to versions of database being used.

One way to solve the problem is to isolate the piece of code causing the RTS 114 error and rewrite the code in a differnet way. The syntax may be correct but trying another method may work.

The documents that Peter Conneeley has supplied to you are the main areas to look at with RTS 114 errors.

Happy coding

Keith.