Updating A Sequential File; Multivolume Record Processing - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

Updating a Sequential File
contain any records, the Status Key is also set to 10 on the first READ
request.
The following guidelines apply in updating records from a file with a
sequential organization:
1. Use a REWRITE to replace an existing record in a file.
2. The record to be rewritten must have been the last record read.
3. If there was no preceding READ, or if the preceding READ was
unsuccessful, the Status Key is set to 92.
4. The 1-0 mode must be specified in the corresponding OPEN. Otherwise, a
logic error will occur on a subsequent REWRITE, setting the Status Key to
92.
Multivolume Record Processing
The following rules and guidelines apply to multivolume files:
1. Only files with SEQUENTIAL organization can reside on multiple
volumes.
2. A file is a multivolume file if the Header 1 label contains a 'C' or 'L' in the
multivolume indicator field.
3. To create a multivolume file, you must allocate the data set on all volumes
you will use and the first volume you mount must contain a 'C' or 'L' for
the multivolume indicator.
(The multivolume indicator can be set when the data set is allocated
with the data set maintenance utility as described in the Utilities
Reference/Operations Manual.)
For multivolume diskette OUTPUT files, when end-of-volume is found,
the next volume is requested; after the volume is mounted, the WRITE
is done.
COBOL will mark each volume with a 'C' in the HDRI multivolume
indicator field and set the appropriate sequence number for that volume.
When a CLOSE verb is issued, COBOL will mark that volume as the
last volume ('L').
4. To EXTEND a multivolume file, you must allocate the data set on all
volumes you will be using. The first volume you mount must be the last
volume of the original data set which is being extended, ('L') in the
multivolume HDRI indicator field. If you created the file using COBOL,
this field will have been set by COBOL.
When end-of-voiume is found, the next voiume is requested; after it is
mounted, the Write is done,
COBOL will mark each volume with a 'C' in the HDRI
multivolume indicator field.
If the starting volume had a sequence number assigned to it,
COBOL will assign the appropriate sequence number to all
subsequent volumes.
When a CLOSE verb is issued, COBOL will mark that volume as
the last volume.
5. For reading or updating a multivolume file, the first volume of the file must
be mounted. If the HDRI sequence number is blank, then COBOL
assumes that the first volume is mounted. If it is not blank, COBOL will
5- 12
IBM 5280 COBOL Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents