HP 3000 Manuals

For VSC2 and MF only: Data Divisionin the DBCS Module [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference - Additional Topics

For VSC2 and MF only:  Data Divisionin the DBCS Module 

The JUSTIFIED Clause 

General Rule.   

The JUSTIFIED clause can be used with DBCS data items.

The PICTURE Clause 

General Rules.   

There are two additional categories of data that can be described with a
PICTURE clause:  DBCS and DBCS edited.  Both these categories must be
described as USAGE IS DISPLAY-1.

For MF only:    These categories need not be described as USAGE
DISPLAY-1.

For COB/370 only:    DISPLAY-1 is optional for PIC N, but not for PIC G
items.

Rules for DBCS Data 

   1.  Its PICTURE character-string can contain only the symbol "G" or 
       "N" (MF and COB/370) .

   2.  Its contents can be any characters in the DBCS character set.

Rule for DBCS Edited Data 

Its PICTURE character string can contain any combination of the symbols
"B" and "G".

Symbols Used.   

The functions of these symbols are as follows:

B       Each "B" represents a character position into which the DBCS
        space character is inserted.

G       Each "G" represents a character position which can contain only a
        DBCS character or a DBCS space.,

N       For MF and COB/370 only:    Each "N" represents a character
        position which can contain only a DBCS character or a DBCS space.

Note that each "G" or "B" or "N" (MF and COB/370) represents a single
double-byte character position.

Editing Rules 

The type of editing that can be performed on an item depends on the
category to which the item belongs.  Table 4-1 Function Names Support,
(see the chapter Program Definition in your Language Reference) is
extended with the following information:

          Table 6-1:  Editing Types for Data Categories 

-------------------------------------------------------------------------------------------
|                                                                                         |
|                  Category                                 Type of Editing               |
|                                                                                         |
-------------------------------------------------------------------------------------------
|                                                                                         |
| DBCS                                        None                                        |
|                                                                                         |
| DBCS edited                                 Simple insertion "B" only                   |
|                                                                                         |
-------------------------------------------------------------------------------------------

Fixed Insertion Editing 

When used in an SBCS item, "B" (space) represents an SBCS space.  When
used in a DBCS item it represents a DBCS space.

The REDEFINES Clause 

Syntax Rule.   

If either data-name-1 or data-name-2 is of class DBCS, then both must be
of class DBCS.

For MF only:    This restriction is removed.

RENAMES Clause 

Syntax Rule.   

If either data-name-1 or data-name-2 is of class DBCS, then both must be
of class DBCS. No THROUGH clause is allowed.

The USAGE Clause 

General Format.   

The General Format is extended by the addition of the following:

[]
Syntax Rules. 1. The PICTURE character-string can contain only "G"s and "B"s. An item whose PICTURE character-string contains "G"s must have a USAGE IS DISPLAY-1 clause. Note that therefore the USAGE IS DISPLAY-1 clause makes an item's class DBCS. For MF and COB/370 only: USAGE IS DISPLAY-1 is not required for items whose PICTURE clause contains "G"s (MF) or "N"s. Whenever a PICTURE clause contains a "G" (MF) the associated item is considered to be of class DBCS. 2. The BLANK WHEN ZERO clause cannot be used with group or elementary items described as USAGE IS DISPLAY-1. The SYNCHRONIZED clause is ignored. 3. The usage of a Screen Section data item may be implicitly or explicitly defined as USAGE DISPLAY-1. General Rule. The USAGE IS DISPLAY-1 clause indicates that the format of the data is DBCS. The VALUE Clause Syntax Rules. 1. In a data description entry, if the category of the item is DBCS, the literal in the VALUE clause must be of category DBCS. A DBCS literal is allowed only if the category of the item is DBCS or DBCS edited. 2. A DBCS literal in the VALUE clause must not exceed the size given by the PICTURE character-string. CONDITION-NAME Rule In a condition-name entry, if the associated data item is of category DBCS, all literals in the VALUE clause must be of category DBCS. DBCS literals are allowed only if the category of the associated data item is DBCS.


MPE/iX 5.0 Documentation