IBM AS/400 Frozen Dessert Maker User Manual


 
Valid File Operations
When you update or add a record to a file by relative record number, the record
must already have a place in the member. For an update, that place must be a
valid existing record; for a new record, that place must be a deleted record.
You can use the CL command INZPFM to initialize records for use by relative
record number. The current relative record number is placed in the RECNO field for
all retrieval operations or operations that reposition the file (for example, SETLL,
CHAIN, READ).
Valid File Operations
Table 20 on page 305 shows the valid file operation codes allowed for DISK files
processed by keys and Table 21 on page 306 for DISK files processed by non-
keyed methods. The operations shown in these figures are valid for externally
described DISK files and program-described DISK files.
Before running your program, you can override a file to another file. In particular,
you can override a sequential file in your program to an externally described, keyed
file. (The file is processed as a sequential file.) You can also override a keyed file
in your program to another keyed file, providing the key fields are compatible. For
example, the overriding file must not have a shorter key field than you specified in
your program.
Note: When a database record is deleted, the physical record is marked as
deleted. Deleted records can occur in a file if the file has been initialized
with deleted records using the Initialize Physical File Member (INZPFM)
command. Once a record is deleted, it cannot be read. However, you can
use the relative record-number to position to the record and then write over
its contents.
304 ILE RPG for AS/400 Programmer's Guide