L Code

The L code verifies data based on its length and produces no output if the test fails.

Format

Ln  [,m]

Parameter(s)

n

Specifies a maximum length of n characters.

n,m

Specifies a range of from n to m characters.

Description

Data either exceeding n characters or falling outside the range of nm produces a null value. If n is zero, the length of the value is returned.

For example, assume that the (unformatted) price of a book in the BOOK-CATALOG file must be at least one character and no greater than three characters in length. The following L correlative verifies the data in the attribute PRICE before including it in a report:

L1 , 3

Parameter(s)

One (1)

Specifies that the value must contain at least one character.

3

Specifies that the value should be no longer than three characters.

See Also

Testing Data

P Code

R Code