z/OS TSO/E Programming Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


TCLEARQ - Clear Buffers

z/OS TSO/E Programming Services
SA32-0973-00

TCLEARQ enables your program to throw away "typed ahead" input or unsent output. This clearing of the buffers lets the Command Processor resynchronize with the terminal user.

For example, when a Command Processor analyzes the specified operands in a line of input and discovers missing or incorrect parameters, it issues a TCLEARQ INPUT before sending a prompting message to the user. This ensures that the Command Processor will receive a line of input entered after the terminal user has seen the prompting message.

When the TCLEARQ macro instruction is issued to clear the input buffers, all the input that has been entered at the terminal, but has not yet been processed by the program, is purged.

When the TCLEARQ macro instruction is issued to clear the output buffers, all the output that has been processed by the program but not yet displayed at the terminal is purged.

The TCLEARQ macro instruction can be used only in a time sharing environment. It is ignored if TSO/E is not active when the macro instruction is issued.

Figure 1 shows the format of the TCLEARQ macro instruction; each of the operands is described following the figure.

Figure 1. The TCLEARQ macro instruction
  [symbol]    TCLEARQ       [INPUT ]
                            [OUTPUT]
INPUT
indicates that all input currently in the terminal's input buffer queue will be lost, including the input line currently being entered, if any. If neither INPUT nor OUTPUT is specified, INPUT is assumed.
OUTPUT
indicates that all the output for this terminal that is currently in the terminal's output buffer queue will be purged, except for output messages that have begun to appear at the terminal, or messages from other terminals or the system operator.

When control is returned to the user, register 15 contains one of the following return codes:

Table 1. Return codes from TCLEARQ
Return code dec(Hex) Meaning
0(0) Successful.
4(4) An incorrect parameter was specified.

The following terminal control macro instructions are intended for system use, and are not suggested for use in user-written Command Processors. Inappropriate use of these macro instructions can cause terminal errors.

macro instruction Function Issue in 24-bit addressing mode
STATTN Set attention simulation x
STBREAK Set break x
STCC Specify line-deletion and character-deletion characters x
STCLEAR Set display clear character string x
STCOM Set interterminal communication x
STTIMEOU Set timeout feature x
STTRAN Set character translation x

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014