Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

LIMIT( ) Request maximum list size

&pagelevel(3)&pagelevel

Domain: Variable access (variable name)

The LIMIT( ) function can be applied only to lists. LIMIT( ) requests the number of elements which a list variable can contain. This limit is defined during declaration of list variables using the DECLARE-VARIABLE command in the operand MULTIPLE-ELEMENTS =
*LIST(LIMIT = integer).

Format

LIMIT( )

LIST-NAME = string_expression

Result type

INTEGER (<integer 1 .. 2147483647>)

Input parameters

LIST-NAME = string_expression
Designates a list.

Result

Number of permissible elements; returned in the form of an integer.

Error messages

SDP0426    VARIABLE '(&00)' NOT A LIST 
SDP1007    NO VARIABLE DECLARED 
SDP1101    SYNTAX ERROR IN VARIABLE NAME 

Example

/DECLARE-VAR LIST3, MULT-ELEM=*LIST(LIMIT=10)
/DECLARE-VAR LIST4, MULT-ELEM=*LIST
/A = LIMIT('LIST3')
/SHOW-VAR A
A = 10
/A = LIMIT('LIST4')
/SHOW-VARIABLE A
/A = 2147483647

The list variable LIST3 was declared with LIMIT=10. LIMIT( ) thus also supplies the value 10.
The list variable LIST4 was declared with the default values. LIMIT( ) thus supplies the default value for the maximum list size (231-1).