RPG/400 Help

Position 66 (File Addition)

Position 66 indicates whether records are to be added to a DISK file.

Entry
Explanation

Blank
No records can be added to an input or update file (I or U in position 15). For an output file (O in position 15), a blank is equivalent to an A.

A
Add records to the file. Positions 16 through 18 of the output record specifications for this file must contain ADD, or the WRITE operation code must be used in the calculation specifications.

*----------------------------------------------------------------*
|          Processing Functions for Files                        |
*-------------------------*------------*------------*------------*
|                         | FILE       | FILE       |            |
|                         | DESCRIPTION| DESCRIPTION| OUTPUT     |
|                         | SPECIFICA- | SPECIFICA- | SPECIFICA- |
| FUNCTION                | TIONS      | TIONS      | TIONS      |
|                         | POSITION   | POSITION   | POSITIONS  |
|                         | 15         | 66         | 16-18      |
*-------------------------*------------*------------*------------*
| Create new file(1)      | O          | Blank      | Blank      |
|                         |            |            |            |
|   or                    |            |            |            |
|                         |            |            |            |
| Add records to existing | O          | A          | ADD        |
| file                    |            |            |            |
*-------------------------*------------*------------*------------*
| Process file            | I          | Blank      | Blank      |
*-------------------------*------------*------------*------------*
| Process file and add    | I          | A          | ADD        |
| records to the existing |            |            |            |
| file                    |            |            |            |
*-------------------------*------------*------------*------------*
| Process file and update | U          | Blank      | Blank      |
| the records (update or  |            |            |            |
| delete)                 |            |            |            |
*-------------------------*------------*------------*------------*
| Process file and add    | U          | A          | ADD        |
| new records to an       |            |            |            |
| existing file           |            |            |            |
*-------------------------*------------*------------*------------*
| Process file and delete | U          | Blank      | DEL        |
| an existing record from |            |            |            |
| the file                |            |            |            |
*-------------------------*------------*------------*------------*
| (1)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.              |
*----------------------------------------------------------------*


[ Top of Page | Previous Page | Next Page | Table of Contents ]