The results of I/O operations are communicated to the program using i5/OS messages and I/O feedback information. The I/O feedback area is updated for every I/O operation unless your program is using blocked record I/O. In that case, the feedback area is updated only when a block of records is written. Some of the information reflects the last record in the block. Other information, such as the count of I/O operations, reflects the number of operations on blocks of records and not the number of records. See your high-level language manual to determine if your program uses blocked record I/O.
The I/O feedback area consists of two parts: a common area and a file-dependent area. The file-dependent area varies by the file type. This topic discusses device file type of printers only.
Common I/O feedback area
Offset | Data Type | Length in Bytes | Contents |
---|---|---|---|
0 | Binary | 2 | Offset to file-dependent feedback area. |
2 | Binary | 4 | Write operation count. Updated only when a write operation completes successfully. For blocked record I/O operations, this count is the number of blocks, not the number of records. |
6 | Binary | 4 | Read operation count. Not applicable to printers. |
10 | Binary | 4 | Write-read operation count. Not applicable to printers. |
14 | Binary | 4 | Other operation count. Number of successful operations other than write, read, or write-read. Updated only when the operation completes successfully. This count includes force-end-of-data. |
18 | Character | 1 | Reserved. |
19 | Character | 1 | Current operation.
|
20 | Character | 10 | Name of the record
format just processed, which is either:
|
30 | Character | 2 | Device class:
Byte 1:
Byte 2 (if byte 1 is 02 for printer):
|
32 | Character | 10 | Device name. The name of the device for which the operation just completed. The device name is supplied only for printer, display, tape, diskette, and ICF files. For printer files being spooled, the value is *N. For printer files not being spooled, the value is the device description name. |
42 | Binary | 4 | Not applicable to printer. |
46 | Character | 80 | Reserved. |
126 | Binary | 2 | Not applicable to printer. |
128 | Binary | 2 | For printers, the field value is the record format length, including first-character forms control, option indicators, source sequence numbers, and program-to-system data. If the value is zero, use the field at offset 42. |
130 | Character | 2 | Reserved. |
132 | Binary | 4 | Not applicable to printer. |
136 | Character | 8 | Reserved. |
I/O feedback area for printer files
Offset | Data Type | Length in Bytes | Contents |
---|---|---|---|
0 | Binary | 2 | Current line number in a page. |
2 | Binary | 4 | Current page count. |
6 | Character | 1 | Miscellaneous flags
|
7 | Character | 27 | Reserved. |
34 | Character | 2 | Major return code.
|
36 | Character | 2 | Minor return code. |