Dictionary/3000 Reference Manual (32244-90001)

Chapter 7 249
The Dictionary DICTCDE Utility
Examples of Generated Code
Examples of Generated Code
The following provides a description and example of the COBOL source code generated for
the entities extracted from the Dictionary.
IMAGE Database Definitions
DICTCDE allows you to generate the definition for an entire database or for selected data
sets. The code generated for the database includes the database name, the record layouts
for all its related data sets, and the constants containing the names of the search items.
The data set records generated include the data set name and the associated data items.
The data set name is generated as an 01-level identifier and the data items are generated
as 05-level identifiers. Any child elements which are related to those data items are
generated as 10-level identifiers, 15-level identifiers, and so forth.
The IMAGE special parameters can also be generated for an IMAGE database. These are
the IMAGE special name-constant parameters that identify the database, password, and
search items which are used by the IMAGE intrinsics. The code generated for the IMAGE
special parameters is shown below:
Base parameter:
000300 01 DB-SHPMGT PIC X(9) VALUE " SHPMGT"
Password parameter:
000400 01 SHPMGT-PWD PIC X(10) VALUE " ".
The IMAGE standard parameters can also be generated for the database. (See the
discussion of Parameters under Examples of Generated Code for more information.) Note
that all definitions for an IMAGE database are generated in WORKING-STORAGE in the
DATA DIVISION for a COBOL program.
Example
The following is an example of the code generated for an IMAGE Database:
000100
000200 01 CUST-M-DATA.
000300 05 DELETE-WORD PIC X(2).
000400 05 CUST-NUM PIC S9(8).
000500 05 CUST-NAME PIC X(30).
000600 05 CUST-STREET PIC X(30).
000700 05 CUST-CITY PIC X(20).
000800 05 CUST-STATE PIC X(2).
000900 05 CUST-ZIP PIC S9(10).
001000 05 CUST-PHONE PIC X(12).
001100 05 CUST-CREDIT-LIM PIC S9(8).
001200 05 CUST-BALANCE PIC S9(10).