Purpose
A nonnumeric literal is a string of any allowable EBCDIC or DBCS characters. The nonnumeric literal must be enclosed in single quotation marks.
Nonnumeric literals can be used whenever the process command syntax specifies that the literal be in quotes.
Usage
A single quotation mark in the string is coded as two single quotation marks (' ').
Example 1: Digits and characters used as nonnumeric literals
The digits 0307 and the characters END OF SET CONDITION in the following example are nonnumeric literals:
IF ERROR-STATUS EQ '0307'
THEN
DISPLAY TEXT 'END OF SET CONDITION'.
Example 2: Single quotation marks within a string
The apostrophe contained in the following nonnumeric literal is coded with two single quotation marks:
MOVE 'JOHN KERR''S BROTHER' TO EMP-RELATIONSHIP.
|
Copyright © 2014 CA.
All rights reserved.
|
|