FILETYPE parameter
The FILETYPE parameter specifies whether the database file description describes data records or source records. Further, it specifies whether each member of a database file being created is to contain data records or source records (statements). For example, the file could contain RPG source statements for an RPG program or data description source (DDS) statements for another device or database file.
Note: If you are creating a source type physical database file and are not providing field-level descriptions of the file (through data description specifications (DDS)), you can use either the Create Physical File (CRTPF) command or the Create Source Physical File (CRTSRCPF) command. However, the CRTSRCPF command is usually more convenient and efficient, because it is designed to be used to create source physical files. If DDS is provided when you are creating a source type database file, use the CRTPF command or the Create Logical File (CRTLF) command, which both have the SRCFILE and SRCMBR parameters for specifying source input. Records in a source file must have at least three fields: the first two are the source sequence number field and the date field; the third field contains the source statement. These three fields are automatically provided by the OS/400 when a source file is created for which no DDS is provided; additional source fields can be defined in DDS. The length of the sequence number field must be six zoned digits with two decimal places. The length of the date field must be six zoned digits with no decimal places.
The source sequence number and date fields are added to the source record when:
- Records are read into the system.
- Records are created by the Source Entry Utility (which is part of the licensed Application Development* Tools program).
The fields are added when an inline data file (specified as the standard source file format) is read from the diskette device. The spooling reader places a sequence number in the source sequence number field and sets up a zeroed date field.
If those fields already exist in records read from the diskette device, they are not changed. If the records in a database file are in source format and are being read as an inline data file in data format, the source sequence number and date fields are removed.
For more information about data and source files, see Database Programming topic in the Information Center.
Values allowed
*DATA: The file created contains or describes data records.
*SRC: The file created contains or describes source records. If the file is keyed, the 6-digit source sequence number field must be used as the key field.