Position 20 indicates whether records are to be added to an input or update file. For output files, this entry is ignored. This entry must be blank if the LIKEFILE keyword is specified.
See Table 46 for the relationship between position 17 and position 20 of the file description specifications and positions 18 through 20 of the output specifications.
Function | Specification | ||
---|---|---|---|
File Description | Output | ||
Position 17 | Position 20 | Positions 18-20 | |
Create new file1 or Add records to existing file |
O O |
Blank A |
Blank ADD |
Process file | I | Blank | Blank |
Process file and add records to the existing file | I | A | ADD |
Process file and update the records (update or delete) | U | Blank | Blank |
Process file and add new records to an existing file | U | A | ADD |
Process file and delete an existing record from the file | U | Blank | DEL |
Note:
Within RPG, the term create a new file means to add
records to a newly created file. Thus, the first two entries in this table
perform the identical function. Both are listed to show that there are two
ways to specify that function. |