Version 4.2.6 for Mainframes (Update)
 —  Parameter Reference  —

LE - Reaction when Limit for Processing Loop Exceeded

This Natural profile and session parameter controls the action to be taken if the limit of retrieved records was exceeded in a READ, FIND or HISTOGRAM processing loop. The limit may be specified either globally for a Natural object by using the LIMIT statement or by specifying an explicit limit value supplied in the database processing loop.

Within a Natural session, the profile parameter LE can be overridden by using the session parameter LE.

Possible settings ON

The database loop will be terminated when the limit is reached. The program flow will continue normally with the statement following the terminated database loop. When the execution of the Natural object is complete, error NAT0957 (Database loop limit reached with 'LE=ON'.) is raised.

LE=ON applies only to programs which are loaded from a library located in the system file FUSER, that is, library SYSTEM, or with a (library) name that does not start with the prefix SYS.

OFF The database loop will be terminated when the limit is reached. The program flow will continue normally with the statement following the terminated database loop. When the execution of the Natural object is complete, no error message appears.
Default setting OFF
Dynamic specification yes
Specification within session yes Applicable Statements: SET GLOBALS
Applicable Command: GLOBALS
Application Programming Interface USR1005N See SYSEXT - Natural Application Programming Interfaces in the Utilities documentation.

The LE parameter applies to READ, FIND and HISTOGRAM statements with a limit specified.

Example:

DEFINE DATA LOCAL
1 EMPL-VIEW VIEW OF EMPLOYEES
  2 NAME
END-DEFINE
READ (10) EMPL-VIEW BY NAME
  WRITE NAME
END-READ
END

LE=OFF: after 10 records the loop ends without a message.

LE=ON: after 10 records the loop ends with an error message NAT0957 (Database loop limit reached with 'LE=ON').

Top of page