CNTRL (Control Device) Macro

The CNTRL (control) macro provides commands for I/O devices.

These commands apply to non-data operations of an I/O unit and are specific to this unit. They specify functions such as rewinding tape, card stacker selection, and line spacing on a printer. For optical readers, commands specify marking error lines, correcting a line for journal tapes, document stacker selecting, or ejecting and incrementing documents.

The CNTRL macro does not wait for completion of the command before it returns control to your program, except when certain codes are specified for optical readers.

If your program issues CNTRL requests, ensure that your DTFxx macros (except DTFMT and DTFDR):
  • Include the CONTROL operand.
  • Omit the CTLCHR operand.

If your program uses control characters although the CONTROL operand is specified, then IOCS does not recognize them and treats them as data.

Conversely, if your DTFxx macro for a file includes the CTLCHR operand, your program normally cannot issue a CNTRL macro for this DTFxx. It can issue a CNTRL macro in this case only if:
  1. The macro refers to a DTFPR defined printer and requests an immediate printer operation, and
  2. The device being used is a PRT1 printer or an IBM® 4248.

Examples of immediate printer operations are: space or skip immediate, enable, or disable horizontal copying.

The CNTRL macro is ignored if specified for DTFSD or DTFDI DASD files. The macro cannot be used for:
  • A card-input file that is being processed with two I/O areas.
  • A card-input file on an IBM 3525 if this file is associated with a punch file. Use the macro for the associated punch file instead.

Format

Read syntax diagramSkip visual syntax diagramnameCNTRLfilename(1), code,n1, n2

Requirements for the caller

AMODE:
24
RMODE:
24
ASC Mode:
Primary

Parameters

filename | (1)
Must be the name of the file specified in the DTF header entry. It can be specified as a symbol or in register notation.
code
Is the mnemonic code for the command to be performed. A list of the possible command codes and the related n1 and n2 values is given following the description of the operands.
n1
Is required whenever a number is needed for stacker selection, or immediate printer carriage control.
n2
For a printer file, the operands n1 and n2 might be required. If n1 is omitted and n2 is specified, a comma must be coded for n1.

Return Codes in Register 15

Requirements for the caller:

A list of valid command codes and related n1 and n2 values follows. The codes are listed by device class (disk, tape, and so on) or, if necessary, by device type.