The I/O Request Block (IORB) defines an I/O request.  The IORB may be for an active I/O request being processed by the device, it may be a queued request waiting on a device or it may be a completed I/O request.

An IORB is scheduled to a device by the TXXSIO (Schedule I/O) module.  The UCB has a pointer to a queue of IORB requests.  The top IORB on the UCB queue is the active request.

@IORB    DSECT ,                                                     
IORBNEXT DS    A                  NEXT IORB ON CHAIN                 
IORBUCB  DS    A                  UCB ADDRESS                        
IORBIOB  DS    A                  IOB ADDRESS                        
IORBCCW  DS    A                  CCW ADDRESS                        
IORBTCB  DS    A                  TCB TO BEE DISPATCHED ON COMPLETION
IORBDIE  DS    A                  DISABLED EXIT ROUTINE              
IORBPCI  DS    A                  PCI EXIT ROUTINE                   
IORBERR  DS    A                  ERROR EXIT ROUTINE                 
*                                                                    
IORBFLAG DS    X                  FLAGS                              
IORBFSEN EQU   X'80'              RESCHEDULE FOR SENSE               
IORBOFLN EQU   X'01'              SECHED I/O TO OFFLINE DEVICE       
*                                                                    
IORBECBC DS    X                  I/O COMPLETION CODE                
IORBSEN0 DS    X                  SENSE BYTE ZERO                    
IORBSEN1 DS    X                  SENSE BYTE ONE                     
IORBCSW  DS    XL8                CSW                                
*                                                                    
IORBWORK DS    XL64               WORK AREA

The IORBNEXT field is used to maintain the IORB queue off the UCB.  They are queued oldest to newest.  IORBUCB points to the UCB the I/O request is for.  The IORBIOB points to the IOB associated with the EXCP request that created the IORB.  The IORBCCW points to the CCW program.

IORBTCB points to a TCB that will be added to the dispatch chain when the I/O is complete.  The TCB is supplied by the caller of the TXXSIO routine.  The TCB PSW should point to a routine that will handle the completion of the I/O request.  The TCBDIE field contains the address of a routine that will be called from the I/O Interrupt routine.

The status fields (IORBECBC, IORBSEN0, IORBSEN1, and IORBCSW) return the status of the completed I/O request.

The IORBWORK is a 64 byte work area to be used by TXXSIO.

[Next – ]