Dictionary/3000 Reference Manual (32244-90001)

Chapter 7 261
The Dictionary DICTCDE Utility
Examples of Generated Code
Since the recsize parameter is generated from the entries in the Dictionary, not from a
total of the storage sizes of the elements in the file, care should be taken when defining the
file's record size in the Dictionary. Otherwise, the record size defined for the file may
conflict with the record layout of the file. (Refer to Chapter 4, DICTDBM Commands, for
more information on the above DICTDBM prompts.)
If any of the entries were not defined in the Dictionary for the above parameters, the
corresponding clause for those parameters would not be generated.
The record layout of the file can be generated in the FD statement or in
WORKING-STORAGE. The record layout identifies the data items associated with the file.
Each data item in the file is generated as an 05-level identifier. The child elements of those
data items are generated as 10-level identifiers, 15-level identifiers and so forth. If the
alias option is enabled when the code is generated, then any data item that has an alias
within the file will be generated with its alias as the COBOL identifier.
When the record layout of the file is generated in the FILE SECTION, it will immediately
follow the FD Statement as shown below:
000100
000200 FD KORDER
000300 RECORDING MODE IS F.
000400
000500 01 KORDER-DATA.
000600 05 CUST-NUM PIC S9(8).
000700 05 CUST-CREDIT-LIM PIC S9(8).
000800 05 CUST-BALANCE PIC S9(10).
000900 05 INVOICE-NUM PIC S9(8).
001000 05 INVOICE-TOTAL PIC S9(10).
001100 05 INVOICE-DATE PIC X(8).
When the record layout is generated in WORKING-STORAGE, and no copylib module has
been specified for the FD Statement, the code will be generated as shown below:
000100
000200 01 KORDER-DATA.
000300 05 CUST-NUM PIC S9(8).
000400 05 CUST-CREDIT-LIM PIC S9(8).
000500 05 CUST-BALANCE PIC S9(10).
000600 05 INVOICE-NUM PIC S9(8).
000700 05 INVOICE-TOTAL PIC S9(10).
000800 05 INVOICE-DATE PIC X(8).