When adding records to a BDAM data set, bear in mind the following:
- When adding undefined or variable-length records (keyed or nonkeyed),
you must specify the track on which each new record is to be added. If space
is available on the track, the record is written following the last previously
written record, and the record number is put in the "R" portion of the
record identification field of the record. The track specification may be
in any format except relative block. If you use zoned-decimal relative format,
the record number is returned as a 2-byte zoned decimal number in the seventh
and eighth positions of the record identification field.
The extended search
option allows the record to be added to another track if no space is available
on the specified track. The location at which the record is added is returned
to the application program in the record identification field being used.
When adding records of undefined length, use the LENGTH option to
specify the length of the record. When an undefined record is retrieved, the
application program must find out its length.
- When adding keyed fixed-length records, you must first format the data
set with dummy records or "slots" into which the records may be added.
You signify a dummy record by a key of X'FF's. The first byte of data
contains the record number.
- When adding nonkeyed fixed-length records, give the block reference in
the record identification field. The new records are written in the location
specified, destroying the previous contents of that location.
- When adding keyed fixed-length records, track information only is used
to search for a dummy key and record, which, when found, is replaced by the
new key and record. The location of the new record is returned to the application
program in the block reference subfield of the record identification field.
For example, for a record with the following identification field:
0 3 0 ALPHA
T T R KEY
the search starts at relative track three. When control
is returned to the application program, the record identification field is:
0 4 6 ALPHA
showing that the record is now record six on relative
track four.
- When adding variable-length blocked records you must include a 4-byte
record description field (RDF) in each record. The first two bytes
specify the length of the record (including the 4-byte RDF); the other two
bytes consist of zeros.
You cannot change the
record length of a variable blocked or unblocked BDAM record on a REWRITE
command which specifies deblocking. You cannot change the record length of
an undefined format BDAM record on a REWRITE command either.
[[ Contents Previous Page | Next Page Index ]]