HP 3000 Manuals

Data Division [ Micro Focus COBOL Language Reference - Additional Topics ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference - Additional Topics

Data Division 

The JUSTIFIED Clause 

General Rule.   

The JUSTIFIEDclause can be used with NCHAR data items.

The PICTURE Clause 

General Rules.   

There are two additional categories of data that can be described with a
PICTUREclause:  NCHAR and NCHAR-EDITED. Both of these categories can be
described as USAGE IS NCHAR or USAGE IS JAPANESE.

Rules for NCHAR Data 

   1.  Its PICTUREcharacter-string can contain only the symbol "N".

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

Rule for NCHAR-EDITED Data 

Its PICTUREcharacter string can contain any combination of the symbols
"N", "B", "/" and "0".  Refer to the chapter The Nucleus for edited-data
rules.

Symbols Used.   

The functions of these symbols are as follows:

   Symbol        Representation       Example       NCHAR 
                                      Japanese      Values 

                                     Shift-JIS       EUC 

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

B            Each "B" represents a  x"8140" (1)    x"A1A1"
             character position
             into which the DBCS
             space character is
             inserted.

/            Each "/" represents a    x"851E"      x"A1BF"
             character position
             into which the DBCS
             forward slash is
             inserted.

0            Each "0" represents a    x"824F"      x"A3B0"
             character position
             into which the DBCS
             Zero is inserted.

(1) This value is sensitive to the DBSPACE directive

Note that each "N", "B", "/", "0" represents a single double-byte
character position.

Editing Rules 

The type of editingthat 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 7-1 :  Editing Types for Data Categories  

Category             Type of Editing 

NCHAR                None

NCHAR-EDITED         Simple insertion "B", "/", "0" only

Fixed Insertion Editing 

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

When used in an SBCS item, "/" (forward slash) represents an SBCS forward
slash.  When used in an NCHAR item it represents a DBCS forward slash.

When used in an SBCS item, "0" (zero) represents an SBCS zero.  When used
in an NCHAR item it represents a DBCS zero.

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 "N"s, "B"s, "/"s, and "0"s. Whenever a PICTURE clause contains a "N" the associated item is considered to be of class NCHAR, Japanese. 2. The BLANK WHEN ZERO clause cannot be used with group or elementary items described as USAGE IS NCHAR or USAGE IS JAPANESE. The SYNCHRONIZED clause is ignored. General Rule. The USAGE IS NCHAR or USAGE IS JAPANESE clause indicates that the format of the data is NCHAR. The VALUE Clause Syntax Rule. In a data description entry, if the category of the item is NCHAR, the literal in the VALUEclause must be of category NCHAR. An NCHAR literal is allowed only if the category of the item is NCHAR or NCHAR-EDITED. An NCHAR literal in the VALUE clause must not exceed the size given by the PICTURE character-string.


MPE/iX 5.0 Documentation