I realize this is a really old post, but the info is not correct so I wanted to make sure the next person using google to find this info got the right answer.
In a batch Natural program, you can use TERMINATE 33 to send a return code 33 to the JCL. I believe it will stop execution of your Natural program at that point (acting like an ESCAPE IMMEDIATE function), but if you define the JCL to accept 33 as a return code, it will allow the remaining jobsteps to continue processing.
Here is sample code:
/* IF NO DATA THEN STOP THE PROGRAM
IF #COUNT-GOODREC EQ 0
We use this to run a batch job everyday, look for records, and if none found, then stop the program with 33. The JCL for the email notice then evaluates the COND code of the natural step and if it is 33 it doesn't execute the step to send the email notification. We only want to be notified if there are records.
Not sure why 33 is the chosen number, but it works. If I recall correctly, it didn't work with other numbers, but it's been a long time and I dont' remember. Note that you will have to set your job up to allow 33 as a valid return code, and in our shop that meant that our normal abend codes of 4, 8 and 12 became invalid as abend codes, since we had to state that 33 was the highest valid return code. In our case, this was only a report so it was not mission critical if it really abended, and of course we programmed it so well that we handled all possible bad data conditions in the program without causing an abend :-)
Your shop may be different and may allow specific codes to be defined.
Also - there is another way to abend a natural program, either online or batch: MOVE 9974 to *ERROR-NR
or you can use the old tried and true divide by 0. Both of these will cause an abend of the step in the batch job, which may not allow you to continue processing your steps. Not sure which error code they return.