- The data type A, C or G must be specified in the Data-Type entry.
- The LEN keyword cannot be specified if the Length entry is specified,
or if the From and To entries are specified for subfields. The LEN keyword
must be used to specify a length greater than 9,999,999.
- Length adjustment for LIKE definitions cannot be done using the LEN keyword.
- The length is specified in characters; for UCS-2 and Graphic definitions,
each character represents two bytes.
Figure 1. Examples of the LEN keyword * Use the LEN keyword to define a standalone field of one million
* characters and a standalone array of 100 characters.
D paragraph S A LEN(1000000) VARYING(4)
D splitPara S A LEN(100) DIM(10000)
* Use the LEN keyword to define a data structure of length 16000000,
* and to define three subfields. Since the lengths of the parameters
* are less than 9999999, they can be defined using from-and-to, or length
* notation, or the LEN keyword.
D info DS LEN(16000000)
D name G LEN(100) OVERLAY(info : 14000001)
D address 5000G OVERLAY(info : 14000301)
D country 1 40G
* Use the LEN keyword to define a prototype that returns a varying
* UCS-2 value that is up to 5000 UCS-2 characters long, and to define
* two alphanumeric parameters. Since the lengths of the parameters
* are less than 9999999, they can be defined either using length notation
* or the LEN keyword.
D getDftDir PR C VARYING LEN(5000)
D usrprf A LEN(10) CONST
D type 5A CONST