Need to set return code from NATURAL program

Hello,

I need to set the return code to JCL from natural program. Depend on the return code need to execute the subsequent steps.

I have tried TERMINATE statement job abended(message:user abend).

Is ther any way to set the return code to JCL from natural program.
Please help!

Thanks,
Arun

Hi,

TERMINATE will set the condition code that can be checked by following steps and should normally not cause an abend.

What value did you try with?

Hi ,

I have tried with TERMINATE 02 and 03.program returns the following abend.
NAT9987 Natural session terminated abnormally - RC=002.

Natural is terminating normally when giving TERMINATE 00.For all other values program is abending.

Thanks,
Arun :slight_smile:

This is also correct and this is not abend (=S…)

If you look at the joblog you can see the step ended with a condition code of 2 (or 3) and not with an Operating System Abend Code (like SB37).