HP DDL D40 Reference Manual page 304

Data definition language
Table of Contents

Advertisement

DDL Compiler Commands
command) and stores the records in the dictionary, then the user must use the
same commands while requesting FUP output of those records.
The format specification for both alternate key and main file is the same (file
format 2 in this case).
DDL does not allow you to define record length more than the maximum allowed
length for the particular type of file.
For format 2 files, the maximum allowed record length (assuming the block size as
4096 bytes) is as follows.
File type
Unstructured
Entry-sequenced
Relative
Key-Sequenced
If you attempt to define a record size greater than the above specified record sizes
DDL issues an error message.
NEWFUP_FILEFORMAT Example
In the following example, the DDL compiler generates a statement in FUP source files
to create a format 2 file:
20> DDL
?DICT
?NEWFUP_FILEFORMAT
DEF EMP.
02
EMP-NAME
02
EMP-ID
02
EMP-SALARY PIC 9(6)V9(2).
END.
?FUP
RECORD EMPL.
FILE
IS "EMPLOYEE".
DEF
IS
KEY
IS
KEY "MN" IS
END.
?DICT
Audited dictionary created on subvol $ADE101.MANUAL.
Dictionary opened on subvol $ADE101.MANUAL for update access.
?NEWFUP_FILEFORMAT
DEF EMP.
02
EMP-NAME PIC X(20).
02
EMP-ID
02
EMP-SALARY PIC 9(6)V9(2).
END.
Data Definition Language (DDL) Reference Manual—426798-002
Record size (format 2 file)
4096 Bytes
4048 Bytes
4048 Bytes
4040 Bytes
PIC X(20).
PIC 9(4) COMP.
EMP.
EMPL.EMP-ID.
EMPL.EMP-NAME.
PIC 9(4) COMP.
NEWFUP_FILEFORMAT Command
9- 74

Advertisement

Table of Contents
loading

Table of Contents