COBOL Manual for TNS and TNS/R Programs

Language Elements
HP COBOL Manual for TNS and TNS/R Programs522555-006
3-5
Separators
Comma or Semicolon
A comma (,) or semicolon (;) that immediately precedes one or more spaces acts as a
comma separator or semicolon separator, respectively. Except where explicitly
prohibited, you can use comma and semicolon separators anywhere that the
specifications permit or require space separators.
Colon
The colon (:) is a separator that COBOL uses to distinguish a reference modifier from a
subscript. The colon marks the end of the leftmost character position portion of the
reference modifier. It is required when shown in a syntax diagram.
Period
A period (.) that immediately precedes one or more spaces acts as a period separator.
Period separators are required in certain places by the syntactic definition of COBOL.
They cannot appear anywhere else.
Each sentence within the Identification and Procedure divisions and each entry within
the Environment and Data divisions must end with a period separator.
Quotation Marks
Quotation marks in balanced pairs enclose nonnumeric literals. You must precede the
beginning quotation mark (") with a space and follow the ending quotation mark with a
separator space, comma, semicolon, period, or right parenthesis. Except where a
literal continues across several lines, each delimiting quotation mark acts as a
separator.
Within a simple nonnumeric literal, two consecutive quotation marks represent one
quotation mark.
Parentheses
The punctuation characters left parenthesis [(] and right parenthesis [)] serve
individually as separators. Parenthesis separators can appear only in balanced pairs
delimiting subscripts, reference modifiers, arithmetic expressions, or conditions. The
opening member of each balanced pair must be a left parenthesis separator; the
closing member must be a right parenthesis separator.
Equal Sign
The pseudo-text delimiter (==) is a separator. It can only appear in balanced pairs
delimiting pseudo-text. An opening pseudo-text separator must be immediately
preceded by a space. A closing pseudo-text separator must be immediately followed
by a space, comma, semicolon, or period separator.