The CNTRL macro controls magnetic tape drives (BSAM only for a data set that is not open for output), directly allocated card readers, IBM® 3525 Card Punches (read and print features), printers (BSAM and QSAM), and the IBM 3890 Document Processor (QSAM only).
The MACRF parameter of the DCB macro must specify a C. The CNTRL macro is ignored for spooled SYSIN or SYSOUT data sets. For BSAM, all input and output operations must be tested for completion before the CNTRL macro is issued. The control facilities available are as follows:
Card Reader: Provides stacker selection, as follows:
QSAM:For unblocked records, issue a CNTRL macro after every input request. For blocked records, issue a CNTRL macro after the last logical record on each card retrieved. In either case, do not issue a CNTRL macro after a GET macro causes control to pass to the EODAD routine. The move mode of the GET macro must be used, and the number of buffers (BUFNO field of the DCB) must be 1. If a CLOSE macro is issued before the last card is read, the operator should clear the reader before the device is used again.
BSAM:The CNTRL macro should be issued after every input request.
Printer: Provides line spacing or a skip to a specific carriage control channel. You cannot use a CNTRL macro if carriage control characters are provided in the record. If the printer contains the universal character set feature, data checks should be blocked (OPTCD=U should not appear in the data control block).
Magnetic Tape: Provides method of forward spacing and backspacing (BSAM only for a data set not open for output). If OPTCD=H is indicated in the data control block, you can use the CNTRL macro to perform record positioning on VSE 1 tapes that contain embedded checkpoint records. Embedded checkpoint records found during the record positioning are bypassed and are not counted as blocks spaced over. OPTCD=H must be specified in a job control language DD statement. The CNTRL macro cannot be used to backspace VSE 7-track tapes written in data convert mode that contain embedded checkpoint records (BSAM).
Do not use the CNTRL macro with output operations on BSAM tape data sets.
3525 Printing: Provides line spacing or a skip to a specific printing line on the card. The card contains 25 printing lines; the odd-numbered lines 1 through 23 correspond to the printer skip channels 1 through 12 (see the SK parameter).
The CNTRL macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses.
The format of the CNTRL macro is:
[label] |
CNTRL |
dcb address |
---|
If the forward space or backspace operation is not completed successfully, control is passed to the error analysis (SYNAD) routine. If no SYNAD exit routine is designated, the task is abnormally terminated.
For more information on register contents when control is passed to the error analysis routine, see z/OS DFSMS Using Data Sets. If a tape mark is found for BSR or FSR, control is returned to the processing program, and register 15 contains a count of the uncompleted forward spaces or backspaces. If the operation is completed normally, register 15 contains the value zero. If CNTRL encounters a tape mark, it moves the tape back over the tape mark before returning to the user.