HP 3000 Manuals

Generating the PICTURE Clause from the Edit Mask [ HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual ] MPE/iX 5.0 Documentation


HP SYSTEM DICTIONARY XL COBOL DEFINITION EXTRACTOR Reference Manual

Generating the PICTURE Clause 
from the Edit Mask 

If you request generation of the PICTURE clause from the edit-mask, all
other attributes pertaining to the clause are ignored.  Only if the
element's type cannot be determined from the edit-mask is the
element-type attribute used to determine if the value is alphanumeric or
numeric.

If no edit-mask attribute exists, the PICTURE is determined using other
attribute data as shown in Table C-1.

SDCDE uses the synchronize and justify attributes to generate the
corresponding SYNCHRONIZE LEFT and JUSTIFIED RIGHT clauses, regardless of
whether the PICTURE clause is generated from the edit-mask attribute or
not.

In order to generate the PICTURE clause from the edit-mask, some
characters must be translated into COBOL edit characters.  Table C-2 maps
the translation of each System Dictionary edit-mask character to its
corresponding COBOL edit mask character.

          Table C-2.  Edit-Mask Translation 

---------------------------------------------------------------------------
|                                |                                        |
|       SYSTEM DICTIONARY        |                 COBOL                  |
|      EDIT MASK CHARACTER       |          EDIT MASK CHARACTER           |
|                                |                                        |
---------------------------------------------------------------------------
|                                |                                        |
|                ^               |   X if type is X or U, otherwise 9     |
|             (blank)            |   B                                    |
|                DR              |   DB                                   |
|                !               |   Not a COBOL edit character           |
|                .               |   .                                    |
|                ,               |   ,                                    |
|                /               |   /                                    |
|                B               |   B                                    |
|                0               |   0                                    |
|                $               |   $                                    |
|                *               |   *                                    |
|                Z               |   Z                                    |
|                +               |   +                                    |
|                -               |   -                                    |
|                CR              |   CR                                   |
|                DB              |   DB                                   |
|                A               |   A                                    |
|                X               |   X                                    |
|                9               |   9                                    |
|                S               |   S                                    |
|                V               |   V                                    |
|                P               |   P                                    |
|            All others          |   No other characters are allowed      |
|                                |                                        |
|                                |                                        |
---------------------------------------------------------------------------

NOTE: The currency sign would not be $ if the CURRENCY SIGN IS clause is
used.

In addition to the above, the repetition characters are also considered
valid COBOL edit characters.  Thus, any numbers that are enclosed in
parentheses ( X(15) ) are considered valid.


MPE/iX 5.0 Documentation