DDL Compiler Commands
Data Definition Language (DDL) Reference Manual — 426798-002
9- 74
NEWFUP_FILEFORMAT Command
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.
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 PIC X(20).
02 EMP-ID PIC 9(4) COMP.
02 EMP-SALARY PIC 9(6)V9(2).
END.
?FUP
RECORD EMPL.
FILE IS "EMPLOYEE".
DEF IS EMP.
KEY IS EMPL.EMP-ID.
KEY "MN" IS EMPL.EMP-NAME.
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 PIC 9(4) COMP.
02 EMP-SALARY PIC 9(6)V9(2).
END.
File type
Record size (format 2 file)
Unstructured
4096 Bytes
Entry-sequenced
4048 Bytes
Relative
4048 Bytes
Key-Sequenced
4040 Bytes