This information briefly explains the procedures required when
issuing the EXCP and EXCPVR macro instruction. To issue the
EXCP or EXCPVR macro instruction directly,
perform the following tasks.
- Allocate the data set or device to be used for the EXCP request.
See Allocating the Data Set or Device.
- Construct and open a data control block (DCB) with the DCB and
OPEN macro instructions. Optionally create a data control
block extension (DCBE) before issuing the OPEN macro. See Initializing a Data Control Block (OPEN)and Opening the Data Set.
- Create a channel program containing the commands necessary to
perform the I/O operations on the appropriate device. See Creating the Channel Program.
- Create the control blocks needed to initiate the EXCP request.
This includes the input/output block (IOB) and event control block
(ECB), and optionally the input/output block extension (IOBE), and
input/output error data block (IEDB). See Creating the EXCP-Related Control Blocks.
For
more information on specific control blocks, see Control Block Fields.
- Issue an EXCP or EXCPVR macro instruction to pass the address
of the IOB, and optionally the IOBE, to the routines that initiate
and supervise I/O operations.
After issuing EXCP or EXCPVR, issue
a WAIT or EVENTS macro instruction specifying the address of the ECB,
to wait for the channel program to complete. See Executing the Channel Program.
- Once the I/O request has completed, examine the completion status
of your EXCP or EXCPVR request and process any error conditions that
may have occurred. See Processing the I/O Completion Status.
- If volume switching is necessary (because of a unit exception
or end of DASD extent), issue the EOV macro. See Handling End of Volume and End-Of-Data-Set Conditions.
- When data set processing is complete, close the data set to restore
the DCB. See Closing the Data Set.
- If your program called dynamic allocation, it can optionally
call dynamic unallocation.