CNTRL—Control directly allocated input/output device (BSAM and QSAM)

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:

dcb address—RX-Type Address or (2-12)
specifies that the address of the data control block for the data set that is opened for the online device. When issued in 31-bit addressing mode, the input DCB address must be a clean 31-bit address.
SS,{1|2}
specifies that the control function that is requested is stacker selection on a card reader. Either 1 or 2 must be coded to indicate which stacker is selected.
SP,{1|2|3}
specifies that the control function that is requested is printer line spacing or 3525 card punch line spacing. Either 1, 2, or 3 must be coded to indicate the number of spaces for each print line.
SK,{1|2|...|11|12}
specifies that the control function that is requested is a skip operation on the printer or 3525 card punch, print feature. A number (1 through 12) must be coded to indicate the channel or print line to which the skip is to be taken.
BSM
specifies that the control function that is requested is to backspace the magnetic tape past a tape mark, then forward space over the tape mark.
FSM
specifies that the control function that is requested is to forward space the magnetic tape over a tape mark, then backspace past the tape mark.
BSR
specifies that the control function that is requested is to backspace the magnetic tape the number of blocks indicated in number-of-blocks.
FSR
specifies that the control function that is requested is to forward space the magnetic tape the number of blocks indicated in number-of-blocks.
number of blocks—symbol, decimal digit, absexp, or (2-12)
specifies the number of blocks to backspace (see BSR parameter) or forward space (see FSR parameter) the magnetic tape. The maximum value that can be specified is 32767. If number-of-blocks is omitted, 1 is assumed.

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.

1 VSE (Virtual Storage Extended) tapes used to be called DOS tapes.