IBM OS/390 Time Clock User Manual


 
To create a file using this method under MVS, you would normally initialize each
track by writing a capacity record (R0) and erasing the 2.sp of the track. In VSE,
you would do this by using the WRITE RZERO macro; in MVS you use the WRITE
SZ macro. However, in MVS, you need not update the track address because
this is done automatically by the WRITE SZ macro. By testing register 15 for a
non-zero value after each WRITE, you can determine when MVS has initialized
all the tracks. Also, you need a second sequential DCB (DSORG=PS) for the
WRITE SZ macro. An example of this procedure is shown in Figure 49 on
page 321. The example also shows how secondary space allocation can be
obtained if an out-of-extent condition occurs while you are creating the data set.
Processing a DAM File under VSE
Figure 50 illustrates how a DA file that has been loaded sequentially under VSE
may be processed. Records are retrieved for updating purposes by key and the
relative track number. When the record-not-found condition occurs, the
transaction record whose key was used for the search is added to the disk file
by a WRITE AFTER.
OPEN DAMFILE
.
READ DAMFILE,KEY
WAITF DAMFILE
.
.
WRITE DAMFILE,KEY
WAITF DAMFILE
.
.
ADDITION WRITE DAMFILE,AFTER
WAITF DAMFILE
.
CLOSE DAMFILE
.
DAMFILE DTFDA BLKSIZE=58,ERRBYTE=ERROR, C
IOAREA1=OUTPUT,SEEKADR=ADDR, C
TYPEFLE=INPUT,AFTER=YES,DSKXTNT=3, C
KEYARG=KEY,KEYLEN=3,VERIFY=YES, C
READKEY=YES,RELTYPE=HEX, C
WRITEKY=YES,DEVICE=3340
DAMOD AFTER=YES,ERREXT=YES,RELTRK=YES
Figure 50. Processing a DAM file under VSE
To process a randomly loaded file, use a similar process, but use READ ID for
retrieving records and WRITE ID for updating and adding records.
Processing a DAM File under MVS
The procedure for adding records to a BDAM data set is similar to the one
illustrated in Figure 50. The computation of the block address field varies
according to the reference method used. For example, if the data set had been
created sequentially, as in Figure 47 on page 320, record reference by block
address only can be used. In this case, the coding might be as illustrated in
Figure 42 on page 317.
324 VSE to OS/390 Migration Workbook