Character Set [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
Character Set
Most character strings and all delimiters in a COBOL program are formed
from characters selected from the COBOL character set. This character
set includes upper case letters A through Z, lower case letters a through
z, digits 0 through 9, and certain special characters:
Special
Character Meaning
+ Plus sign
- Minus sign
* Asterisk
/ Slash
= Equal sign
$ Currency sign
, Comma
; Semicolon
: Colon
. Period (decimal point)
" Quotation mark
' Apostrophe This is an HP extension to
the ANSI COBOL standard.
( Left parenthesis
) Right parenthesis
> Greater than
< Less than
Space
% Percent sign This is an HP extension to
the ANSI COBOL standard.
@ At sign This is an HP extension to
the ANSI COBOL standard.
\ Back slash This is an HP extension to
the ANSI COBOL standard.
In the case of nonnumeric literals, comment entries, and comment lines,
additional characters may be used. These characters are selected from
the ASCII Character Set listed in Appendix D , (which includes the
COBOL Character Set).
NOTE When lower case letters appear outside of literals, the HP COBOL II
compiler automatically converts them to upper case letters.
Each character in the ASCII Character Set has a unique value that
establishes its order in the collating sequence of this character set.
In Appendix D , the characters are listed in order of ascending value.
NOTE When COBOL programs originally written for other systems are run on
an HP Computer System, variations between the collating sequences
for both systems may cause variations in output. For example, the
Binary Coded Decimal (BCD) and Extended Binary Coded Decimal
Information Interchange Code (EBCDIC) both collate the letters of
the alphabet before (lower than) the digits 0 through 9. This
differs from the ASCII Collating Sequence, where digits are
collated before letters. In addition, several special characters
collate differently in various sequences. To permit valid
processing when a different collating sequence is used, you may
specify the appropriate sequence in the ALPHABET and PROGRAM
COLLATING SEQUENCE clauses of the ENVIRONMENT DIVISION.
MPE/iX 5.0 Documentation