HP System Dictionary/XL COBOL Definition Extractor (32257-90001)
4- 34
Creating COBOL Names
SDCDE automatically prefixes or suffixes some COBOL data names. This is in addition to the user-
controlled prefixes, suffixes, and qualifications. SDCDE does this for two reasons:
• Prefixes help identify the data item's usage. For example, because the "DB-" prefix is always attached
to the constants for database names, you can easily identify constants of this kind.
• Sometimes one entity may generate a number of COBOL data names of different usage. For example, a
data set generates a COBOL record as well as a constant for the data set name. In this case, a prefix or
suffix is necessary to create two distinct names.
Table 4-1 shows the prefixes and suffixes that SDCDE attaches to different kinds of COBOL data names.
Note that record names are suffixed, and the constants are prefixed.
If an illegal COBOL character is found in an entity name, it is replaced with a "-." Then, if the first or the
last character of the name is a "-," it is prefixed or suffixed with an "X-" or a "-X." If an entity name is a
COBOL reserved word, it is suffixed with an "-X" . When any of these conditions occurs, SDCDE issues
warning messages.
The maximum length for COBOL names in SDCDE is 61 characters. If a name is longer than 61
characters, it is truncated.
Table 1: COBOL Prefixes and Suffixes
Entity Type COBOL Data Type
Prefix/
Suffix
Prefix/
Suffix
Name
IMAGE-DATABASE Constant for DB name
Constant for DB password
Prefix
Prefix
DB-
PWD-
IMAGE-DATASET Record name
Constant for DS name
Constant for search item
Suffix
Prefix
Prefix
-DATA
DS-
DI-
FORMSFILE Constant for FF name
Constant for FF lockword
Constant for head form name
Prefix
Prefix
Prefix
FF-
LWD-
HF-
FORM Record name
Constant for FORM name
Record name for field #'s
Constant for field #
Suffix
Prefix
Suffix
Prefix
-DATA
FORM-
-FIELDS
FIELDNO-
FILE Record name
Record name in FILE section
Constant for file name
Constant for file lockword
Suffix
Suffix
Prefix
Prefix
-DATA
-REC
FILE-
LWD-
KSAMFILE Record name
Record name in FILE section
Constant for KSAM file name
Constant for file lockword
File table constant for KSAM
Suffix
Suffix
Prefix
Prefix
Suffix
-DATA
-REC
KSAM-
LWD-
-FILETAB