Initialize data in a physical file member

To use relative record processing in a program, the database file must contain a number of record positions equal to the highest relative record number used in the program. Programs using relative-record-number processing sometimes require that these records be initialized.

You can use the Initialize Physical File Member (INZPFM) command to initialize members with one of two types of records:

You specify which type of record you want using the RECORDS parameter on the INZPFM command.

If you initialize records using default records, the fields in each new record are initialized to the default field values defined when the file was created. If no default field value was defined, then numeric fields are filled with zeros and character fields are filled with blanks.

Variable-length character fields have a zero-length default value. The default value for null-capable fields is the null value. The default value for dates, times, and timestamps is the current date, time, or timestamp if no default value is defined. Program-described files have a default value of all blanks.
Note: You can initialize one default record if the UNIQUE keyword is specified in DDS for the physical file member or any associated logical file members. Otherwise, you would create a series of duplicate key records.

If the records are initialized to the default records, you can read a record by relative record number and change the data.

If the records are initialized to deleted records, you can change the data by adding a record using a relative record number of one of the deleted records. (You cannot add a record using a relative record number that was not deleted.)

Deleted records cannot be read; they only hold a place in the member. A deleted record can be changed by writing a new record over the deleted record.

Related concepts
Delete database records
Related reference
Initialize Physical File Member (INZPFM) command