Data Event Control Block

A data event control block is constructed as part of the expansion of READ and WRITE macro instructions and is used to pass parameters to the control program, help control the read or write operation, and receive indications of the success or failure of the operation. The data event control block is named by the READ or WRITE macro instruction, begins on a fullword boundary, and contains the information shown in Table 1.

Table 1. Data event control block
Offset from DECB Address (Bytes) Field Contents BSAM and BPAM BISAM BDAM
0 ECB ECB ECB1
+4 Type Type Type
+6 Length Length Length
+8 DCB address DCB address DCB address
+12 Area address Area address Area address
+16 Address of status indicators3 Logical record address Address of status indicators3
+20   Key address Key address
+24   Exception code (2 bytes)2 Block address
+28     Next address
Note:
  1. The control program returns exception codes in bytes +1 and +2 of the ECB.
  2. See Table 2.
  3. See Figure 1.

For BISAM, exception codes are returned by the control program after the corresponding WAIT or CHECK macro instruction is issued, as indicated in Table 2.

Table 2. Exception code bits—BISAM
Exception Code Bit in DECB READ WRITE Condition If On
0 X Type K Record not found
1 X X Record Length Check
2   Type KN Space not found
3 X Type K Nonvalid request
4 X X Uncorrectable I/O error
5 X X Unreachable block
6 X   Overflow record
7   Type KN Duplicate record
8-15     Reserved for control program use
Descriptions of the conditions in Table 2 follow: