Procedure Division in the DBCS Module [ COBOL/HP-UX Language Reference for the Series 700 and 800 ] MPE/iX 5.0 Documentation
COBOL/HP-UX Language Reference for the Series 700 and 800
Procedure Division in the DBCS Module
(VSC2)
Conditional Expressions
Relation Conditions.
Data items and literals of class DBCS can be used in a relation condition
with any relational operator. Each operand must be either a group item
or of class DBCS. No conversion, editing, or de-editing is done; no
distinction is made between items of category DBCS and items of category
DBCS edited.
The operation performed is a nonnumeric comparison. Since there is in
general no collating sequence between the characters in a DBCS character
set, the collating sequence used is based on the numeric values of the
bit patterns representing the characters, interpreted as if they were
binary numbers.
Note that if the DBCS character codes include codes for characters in the
SBCS character set, there is no guarantee that this collating sequence
will order them the same as in SBCS.
________________________________________________________________________
|(MF) |
|Where a character exists in both the DBCS and SBCS character |
|sets, its DBCS and SBCS representations will not beregarded |
|as equivalent. See the section Roman Script in DBCS in this |
|chapter. |
________________________________________________________________________
The PROGRAM COLLATING SEQUENCE clause has no effect on comparisons
involving data items of class DBCS or DBCS literals.
If the operands are of unequal size, comparison proceeds as though the
shorter operand were extended on the right by enough DBCS spaces to make
them the same size.
Class Condition.
The class tests for DBCS items are DBCS and KANJI.
________________________________________________________________________
|(MF) DBCS and KANJI class tests are not supported. |
________________________________________________________________________
Move Operation
(VSC2) (MF)
All statements that involve moving data between items and/or literals of
class DBCS obey the rules given for such moves under the General Rules
for The MOVE Statement later in this chapter.
The ACCEPT Statement
(VSC2) (MF)
Syntax Rule
In Format 2, identifier must not be of class DBCS.
General Rule
In Format 1, DBCS data can be entered only if identifier is of class
DBCS.
The CALL Statement
(VSC2) (MF)
Syntax Rules
1. Identifier-1 must not be a data item of class DBCS; literal-1 must
not be a DBCS literal.
________________________________________________________________________
|(MF) This restriction is removed. |
________________________________________________________________________
2. The program-name given by identifier-1 or literal-1 must not
contain DBCS characters.
________________________________________________________________________
|(MF) This restriction is removed. |
________________________________________________________________________
General Rule
Each item of class DBCS referenced in the USING clause must correspond to
an item of class DBCS in the USING clause of the Procedure Division
header of the called program.
The CANCEL Statement
(VSC2) (MF)
Syntax Rules
1. Identifier-1 must not be a data item of class DBCS; literal-1 must
not be a DBCS literal.
________________________________________________________________________
|(MF) This restriction is removed. |
________________________________________________________________________
2. The program-name given by identifier-1 or literal-1 must not
contain DBCS characters.
________________________________________________________________________
|(MF) This restriction is removed. |
________________________________________________________________________
The INITIALIZE Statement
(VSC2) (MF)
General Format
The General Format is extended by the options DBCS, DBCS-EDITED, NATIONAL
or NATIONAL-EDITED as additional alternatives to ALPHABETIC,
ALPHANUMERIC, et cetera.
General Rule
Specifying the DBCS, DBCS-EDITED, NATIONAL or NATIONAL-EDITED option
causes data items of categories DBCS and DBCS-EDITED to be initialized.
The INSPECT Statement
(VSC2) (MF)
Syntax Rule
All the identifiers and literals except identifier-2 must be of class
DBCS if any one of them is of class DBCS.
General Rule
The count maintained in identifier-2 is of DBCS characters, not bytes.
The MOVE Statement
(VSC2) (MF)
Syntax Rules
1. All the identifiers and literals must be of class DBCS if any one
of them is.
________________________________________________________________________
|(MF) |
|Items of class DBCS, category alphanumeric, and category alphabetic |
|can be mixed freely. |
________________________________________________________________________
2. In Format 2, the MOVE CORRESPONDING format, if either of a pair of
matching items is of class DBCS then they both must be.
General Rules
1. If the sending field is of class DBCS and a receiving field is of
category DBCS Edited, editing is carried out on that receiving
field. For any other combination of fields of class DBCS, no
conversion, editing, or de-editing is done.
________________________________________________________________________
|(MF) |
|This rule is relaxed as follows. If a receiving field is of category |
|DBCS edited, it is edited. For any other combination that includes a |
|field of class DBCS, no conversion, editing, or de-editing is |
|done. |
________________________________________________________________________
2. If a receiving field is a different size from the sending field,
the data is stored in that receiving item and truncated or padded
on the right with DBCS spaces.
The SEARCH Statement
(VSC2) (MF)
Syntax Rule
In Format 2, if identifier-1 is of class DBCS, then the
ASCENDING/DESCENDING KEY item defined in its OCCURS clause must be of
class DBCS also.
The STOP Statement
(VSC2)
Syntax Rule
Literal must not be a DBCS literal.
________________________________________________________________________
|(MF) This restriction is removed. |
________________________________________________________________________
The STRING Statement
(VSC2) (MF)
Syntax Rule
All the identifiers and literals except identifier-4 must be of class
DBCS if any one of them is of class DBCS.
General Rule
The relative position indicated by identifier-4 gives the position in
DBCS characters.
The UNSTRING Statement
(VSC2) (MF)
Syntax Rule
All of identifier-1, -2, -3, literal-1, and -2 must be of class DBCS if
any one of them is of class DBCS.
General Rules
1. The relative position indicated by identifier-7 gives the position
in DBCS characters.
2. The count maintained in identifier-6 is of DBCS characters.
MPE/iX 5.0 Documentation