Version 4.2.6 for Mainframes (Update)
 —  Parameter Reference  —

LT - Limit for Processing Loops

This Natural profile and session parameter is used to limit the number of database records which can be retrieved within Natural applications. This limit applies to all statements retrieving records from the database, that is:

All retrieved records are counted and the result of the count is compared with the LT limit. The count also includes those records which were rejected by a WHERE clause of a FIND, READ or HISTOGRAM statement. The LT limit does not affect the statements STORE, UPDATE, DELETE, END TRANSACTION and BACKOUT TRANSACTION.

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

When a record is retrieved from the database, the count of retrieved records is incremented before it is compared with the current value of the LT parameter. If the incremented count exceeds the current LT value, 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 LT parameter 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.

If the value of the LT parameter is dynamically changed within a program by using a SET GLOBALS LT=n statement, the new limit value becomes effective for the next statement that retrieves a record from the database.

Possible settings 0 - 2147483647

Within a session: 0 to n

(n = value of profile parameter LT at session start)

Maximum number of records that can be retrieved. All retrieved records (including records rejected by means of a WHERE clause) are counted and compaired with this limit.

LT=0 defines that no limit is in effect for the number of retrieved records.

Default setting 99999999  
Dynamic specification yes  
Specification within session yes Applicable Statements: SET GLOBALS, see Note.
Applicable Command: GLOBALS, see Note.
Application Programming Interface USR1005N See SYSEXT - Natural Application Programming Interfaces in the Utilities documentation.

Note:
When the LT parameter is used in conjunction with the statement SET GLOBALS or the system command GLOBALS, the limit value that can be set may not exceed the LT value defined in the Natural parameter module NATPARM.

Top of page