DTFCN (Define the File for Console I/O) Macro

The macro defines an input or output file that is processed on an IBM® console printer-keyboard, or display operator console.

DTFCN provides GET/PUT logic as well as PUTR logic for a file.

Format

Read syntax diagramSkip visual syntax diagramname DTFCN DEVADDR=SYSxxx,IOAREA1= name,BLKSIZE= n,INPSIZE= n,MODNAME= name,RECFORM=FIXUNB,RECFORM=UNDEF,RECSIZE=( r),TYPEFLE=INPUT,TYPEFLE=OUTPUTCMBND,WORKA=YES

Requirements for the caller

RMODE:
24

Parameters

BLKSIZE=n
This operand specifies the length of the I/O area; if the PUTR macro is used (TYPEFLE=CMBND is specified), this operand specifies the length of the output part of the I/O area. For the undefined record format, BLKSIZE must be as large as the largest record to be processed. The length must not exceed 256 characters.

If the console buffering option is specified at system generation time and the device is assigned to SYSLOG, physical IOCS can increase throughput for each actual output record not exceeding 80 characters. This increase in throughput results from starting the output I/O command and returning to the program before output completion. Regardless whether output records are buffered (queued on an I/O completion basis), they are always printed or displayed in first-in-first-out order.

DEVADDR=SYSLOG | SYSnnn
This operand specifies the logical unit name that is associated with the file. Specify DEVADDR=SYSLOG to get partition prefixes (BG, F1, F2, F3, ... Fn) for message identification.

DEVADDR=SYSLOG must be specified if your DTFCN macro includes TYPEFLE=CMBND.

Specifying DEVADDR=SYSnnn is not recommended because:
  • The lines that you write to the console do not have a partition identifier.
  • A GET request for input from the console cannot be buffered, and the system waits for the requested input. Until the operator supplies this input, no other console communication can take place. Thus, your system 's console can become a serious performance bottleneck.
INPSIZE=n
This operand specifies the length of the input part of the I/O area for PUTR macro usage.
IOAREA1=name
This operand specifies the name of the I/O area that is used by the file. For PUTR macro usage, the first part of the I/O area is used for output, and the second part is used for input. The lengths of these parts are specified by the BLKSIZE and INPSIZE operands. The I/O area is not cleared before or after a message is printed, or when a message is canceled and reentered on the console.
MODNAME=name
This operand specifies the name of the logic module that is generated by this DTFCN macro. If this entry is omitted, standard module names are generated for the logic module.

A module name must be given when two phases (each containing a DTFCN macro) are link-edited into the same program. Under such conditions, omission of this operand results in unresolved address constants.

RECFORM=FIXUNB | UNDEF
This operand specifies the record format of the file: fixed length or undefined. FIXUNB must be specified if TYPEFLE=CMBND is specified. FIXUNB is assumed if the RECFORM operand is omitted.
RECSIZE=(r)
For undefined records, this operand is required for output files and is optional for input files. It specifies a general register (2 to 12) that contains the length of the record. On output, you must load the length of each record into the specified register before you issue a PUT macro. If specified for input files, IOCS provides the length of the record that is transferred to storage.
TYPEFLE=INPUT | OUTPUT | CMBND
This operand specifies a file as input, output, or combined. If INPUT is specified, code is generated for both input and output files. If OUTPUT is specified, code is provided for output files only.
CMBND must be specified if you use the PUTR macro. This causes coding to be generated for:
  • Input and output files.
  • The use of PUTR macros, which ensures that a message requiring an operator response is not deleted from the console display.

When CMBND is specified, DEVADDR=SYSLOG must also be specified.

WORKA=YES
This operand indicates that a work area is used with the file. A GET or PUT macro moves the record to or from the work area. A PUTR macro moves the record from and to the work area.