HP 3000 Manuals

For VSC2 and MF only: Procedure Division [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference - Additional Topics

For VSC2 and MF only:  Procedure Division 

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 and 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.

For MF only:    Where a character exists in both the DBCS and SBCS
character sets, its DBCS and SBCS representations are not regarded as
equivalent.  See the section Roman Script in DBCS earlier 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.

For MF only:    DBCS and KANJI class tests are not supported.

Move Operation 

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 

Syntax Rule.   

In Format 2, identifier must not be of class DBCS.

General Rules.   

In Format 1, DBCS data can be entered only if identifier is of class
DBCS.

The CALL Statement 

Syntax Rules.   

   1.  Identifier-1 must not be a data item of class DBCS; literal-1 must
       not be a DBCS literal.

       For MF only:    This restriction is removed.

   2.  The program-name given by identifier-1 or literal-1 must not
       contain DBCS characters.

       For MF only:    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 

Syntax Rules.   

   1.  Identifier-1 must not be a data item of class DBCS; literal-1 must
       not be a DBCS literal.

       For MF only:    This restriction is removed.

   2.  The program-name given by identifier-1 or literal-1 must not
       contain DBCS characters.

       For MF only:    This restriction is removed.

The INITIALIZE Statement 

General Format.   

The General Format is extended by the options DBCS, DBCS-EDITED, NATIONAL 
or NATIONAL-EDITED (MF only) as additional alternatives to ALPHABETIC,
ALPHANUMERIC, et cetera.

General Rule.   

Specifying the DBCS, DBCS-EDITED, NATIONAL or NATIONAL-EDITED (MF only)
option causes data items of categories DBCS and DBCS-EDITED to be
initialized.

The INSPECT Statement 

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 

Syntax Rules.   

   1.  All the identifiers and literals must be of class DBCS if any one
       of them is.

       For MF only:    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.

       For MF only:    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 that is stored in the receiving item is truncated or
       padded on the right with DBCS spaces.

The SEARCH Statement 

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 

Syntax Rule.   

Literal must not be a DBCS literal.

For MF only:    This restriction is removed.

The STRING Statement 

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 

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