Nonnumeric Literals

A nonnumeric literal is a character-string enclosed in quotation marks ("), and can contain any allowable character from the EBCDIC character set. The maximum length of a nonnumeric literal is 256 characters.

A nonnumeric literal must be enclosed in quotation marks (").

If the *APOST compiler option is in effect, the nonnumeric literal must be enclosed by apostrophes (').

The enclosing quotation marks (or apostrophes) are excluded from the literal when the program is compiled. An embedded quotation mark must be represented by a pair of quotation marks ("").

For example,
"THIS ISN""T WRONG"
IBM Extension
IBM Extension

In an apostrophe literal, a double apostrophe ('') is reduced to a single apostrophe when the double apostrophe is also a delimiter.

For example,
'THIS ISN''T WRONG'
represents
THIS ISN'T WRONG
End of IBM Extension
End of IBM Extension

Any punctuation characters included within a nonnumeric literal are part of the value of the literal.

Every nonnumeric literal is in the alphanumeric data category. (Data categories are described in Classes and Categories of Data.)