IBM OS/390 Time Clock User Manual


 
4. Since 37 records (blocks) will fit on one 3340 track, the three-byte
key (ranging from 001-999) is divided by 37 to get the relative track
number and the remainder will be the number of the record on this track.
If a remainder of O is computed, this record will still fit on the
previous track; therefore TT = n, R = 0 will be reset to TT = n-1, R =
37 since a remainder of 37 may not be evaluated otherwise. A key may not
consist of all zeros in this case, as a TT of -1 will result. It is, in
fact, not necessary to maintain the R-byte, since the system does not
use it if WRITE DA is specified.
5. A block is added to the data set. Type DA must be used
and the data length must be stated since RECFM=U was assumed.
6. A second error byte in the DECB is saved (which might not be
necessary) and inspected for the Out of Extentscondition.
7. If the condition was satisfied, the load DCB must be temporarily
closed. Control is then given to the WRITER0 routine which requests
secondary space allocation and, after getting the new extent, writes the
capacity records for this area.
8. If any extents except the initial one(s) have been cleared, loading
may resume after reopening the load DCB, however, the WRITE macro (5)
has to be successfully executed before the load loop is reentered.
9. Note the different DD names and status of the data sets.
Figure 49 (Part 3 of 3). Loading a DAM File of U. or V. Length Records under MVS
In both figures, the file being loaded consists of 50-byte records. Each record
has a three-byte key field followed by 47 bytes of data. The converted key field
becomes the relative track address. Under VSE, the record is written in the first
available space within the file extents on that track. Under MVS you must code
the type field in the WRITE macro as DA. Then, each record you write replaces
the first dummy record found (indicated in the key field) on the specified track. If
the track is already filled but you have requested an extended search (DCB
parameters LIMCT and OPTCD), the search is continued.
Loading a DAM File (Fixed-Length Records without keys)
Loading a file of fixed-length records without keys is similar to loading one when
the records have keys, except that you cannot use the MVS WRITE SD) macro to
write dummy records. You must define what a dummy record looks like when
you create the file.
The DA type WRITE is not applicable in this case. You must retrieve a record,
test it for indications of a dummy record, and after updating, rewrite the record.
Loading a DAM File (Undefined or Variable-Length Records)
For undefined or variable-length records, relative track addressing using keys is
the best method. Before using any track when creating the file, write a capacity
record (R0) and erase the rest of the track by issuing an SZ type WRITE
instruction. If the total space needed for the data set is initially allocated, you
must first write capacity records for all tracks. Then loading the data records
consists of making additions to the initially empty file by using the MVS WRITE
DA macro (similar to the VSE WRITE AFTER macro).
Chapter 13. Assembler 323