File control
The file control classes IccFile , IccFileId , IccKey , IccRBA , and IccRRN allow you to read, write, update and delete records in files.
In addition, IccFileIterator class allows you to browse through all the records in a file.
An IccFile object is used to represent a file. It is convenient, but not necessary, to use an IccFileId object to identify a file by name.
An application program reads and writes its data in the form of individual records. Each read or write request is made by a method call. To access a record, the program must identify both the file and the particular record.
- KSDS
-
Key-sequenced: each record is identified by a key – a field
in a predefined position in the record. Each key must be unique in
the file.
The logical order of records within a file is determined by the key. The physical location is held in an index which is maintained by VSAM.
When browsing, records are found in their logical order.
- ESDS
-
Entry-sequenced: each record is identified by its relative
byte address (RBA).
Records are held in an ESDS in the order in which they were first loaded into the file. New records are always added at the end and records may not be deleted or have their lengths altered.
When browsing, records are found in the order in which they were originally written.
- RRDS file
- Relative record: records are written in fixed-length slots. A record is identified by the relative record number (RRN) of the slot which holds it.