HP 3000 Manuals

Data 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

Data Division in the DBCS Module 

(VSC2) (MF)

The JUSTIFIED Clause 

General Rule 

The JUSTIFIED clause can be used with DBCS data items.

The PICTURE Clause 

(VSC2) (MF)

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.
________________________________________________________________________
|(MF) These categories need not be described as USAGE DISPLAY-1.       |
________________________________________________________________________

            

Rules for DBCS Data 

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

   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
"G" and "B".

Symbols Used.   

The functions of these symbols are as follows:

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

B -   Each "B" represents a character position into which the DBCS space
      character will be inserted.
________________________________________________________________________
|(MF)                                                                  |
|                                                                      |
|                                                                      |
|                                                                      |
|N -   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) 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 3-1.  (see the chapter The 
Nucleus) is extended with the following information:

          Table 11-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 

(VSC2) (MF)

Syntax Rule 

If either data-name-1 or data-name-2 is of class DBCS, then both must be
of class DBCS.
________________________________________________________________________
|(MF) This restriction is removed.                                     |
________________________________________________________________________

            

RENAMES Clause 

(VSC2) (MF)

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 

(VSC2) (MF)

General Format 

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

     [USAGE IS ] DISPLAY-1 

Syntax Rules 

   1.  The PICTURE character-string of a DISPLAY-1 item 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.
________________________________________________________________________
|(MF)                                                                  |
|USAGE IS DISPLAY-1 is not required for items whose PICTURE clause     |
|contains "G"s or "N"s.  Whenever a PICTURE clause contains a "G" 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.

General Rule 

The USAGE IS DISPLAY-1 clause indicates that the format of the data is
DBCS.

The VALUE Clause 

(VSC2) (MF)

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 if
       the category of the item is 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