NAT9974 Natural termination forced by abend 4088 RC=03EC

I am seeking advice on an issue I’m facing with a complex mainframe integration involving Natural, COBOL, and Java programs. Here’s what I’ve tried so far:

  1. Natural Program Calling COBOL - This works fine.
  2. COBOL Program Calling Java on z/OS - This also works fine.
  3. COBOL Calling Natural - No issues here.
  4. Java Calling COBOL - This works without any problems.

The problem arises when I try to combine these scenarios:

  • Natural calls COBOL, and COBOL calls Java: This sequence results in a NAT9974 error (Natural termination forced by abend 4088 RC=03EC), indicating memory exhaustion. Based on my research, this seems related to LE (Language Environment) and RENT-REENTER settings.

Details:

  • I’m not using any middleware; instead, I use JNI for COBOL to call Java, which works as expected.
  • The issue seems to be that Natural does not properly wait for COBOL to complete the Java call and return, leading to the error.

I’ve tried adjusting memory regions (0M, 8M, 128M) with no success. I’m considering an alternative approach where JNI calls C, and Natural uses C to invoke Java.

Request:

  • Am I wrong in my approach?
  • Will fixing the LE settings solve this problem?
  • Has anyone experienced and fixed this type of error?