Figure 130. 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