STRING Type

The type STRING is a structured data type that contains characters of only one character type.

A string has two components: contents and length. No trailing blanks or null characters are added to a string; therefore the length of a string is exactly the number of characters stored in the string. The maximum string length allowed is 2**16–2 characters.

All strings declared in a STRING declaration are of the same string type. If no string type is specified in the STRING declaration, then the default character type is used. The default character type can be designated by the compiler control option ASCII. If no such compiler control option is designated, the default character type is EBCDIC. For more information, refer to Default Character Type.

The number of strings that can be declared in a program is limited by the operating system to 500. If this limit is exceeded, the message STRING POOL EXCEEDED is given.