Dictionary/3000 Reference Manual (32244-90001)

260 Chapter7
The Dictionary DICTCDE Utility
Examples of Generated Code
001600 05 INVOICE-TOTAL PIC S9(10).
001700 05 INVOICE-DATE PIC X(8).
001800 05 FILLER PIC X(971).
KSAM File Definitions
DICTCDE allows you to generate source code for the ENVIRONMENT DIVISION and
DATA DIVISION for a KSAM file.
For the ENVIRONMENT DIVISION portion, DICTCDE generates the SELECT statement
for a KSAM file as follows:
000100
000200 SELECT KORDER
000300 ASSIGN "file-info "
000400 ORGANIZATION IS INDEXED
000500 RECORD KEY IS CUST-NUM
000600 ALTERNATE RECORD KEY INVOICE-NUM
000700 ALTERNATE RECORD KEY INVOICE-DATE WITH DUPLICATES.
The file-info string contains the filename and the FILE SIZE fields as they are defined in
the Dictionary. Note that these fields are generated only if they are defined in the
Dictionary for that file. If a file is related to a LOCATION in the Dictionary, then the alias
(if any), group, and account defined by the LOCATION will be used for the file name field.
DICTCDE also generates the key clauses according to the definitions of the items in the
KSAM file. For the DATA DIVISION portion, DICTCDE generates an entry for the FILE
SECTION and the WORKING-STORAGE record.
The FILE SECTION is generated as follows:
000100
000200 FD KORDER
000300 BLOCK CONTAINS block-size RECORDS
000400 RECORD CONTAINS recsize CHARACTERS
000500 RECORDING MODE IS recording-mode.
The above parameters are generated from the following entries defined in the Dictionary
for a KSAM file:
block-size BLOCKING (N/Y)?
UNIT (R/C)?
MINIMUM
MAXIMUM
recsize MAXIMUM RECORD SIZE
recording-mode RECORD FORMAT (F/V/U/S)?