This Natural profile and session parameter is used to limit the number of database records which can be retrieved within Natural applications.
Maximum number of records that can be retrieved. All retrieved
records (including records rejected by means of a
|Specification within session||yes|
|Application programming interface||
||See SYSEXT - Natural Application Programming Interfaces in the Utilities documentation.|
LTparameter applies to all statements retrieving records from the database; that is, statements that initiate processing loops, such as
SELECT, and statements that retrieve only a single record, such as
LTlimit. The count also includes those records which were rejected by a
WHEREclause of a
LTlimit does not affect the statements
LTparameter. If the incremented count exceeds the current
LTvalue, Natural error NAT1003 (
Global limit for database calls reached) is raised. The count of retrieved records is reset to zero whenever a Natural program is started on Level 1. The count is not reset if the program on Level 1 invokes another Natural object (for further information, see Multiple Levels of Invoked Objects in the Programming Guide). Therefore, the
LTparameter limits the number of records retrieved from the database by a Level 1 program and objects invoked by that program on a level other than 1.
LTparameter is dynamically changed within a program by using a
SET GLOBALS LT=nstatement, the new limit value becomes effective for the next statement that retrieves a record from the database.
LTcan be overridden by using the session parameter