Window Commands

In this section:

In the Terminal Operator Environment, several WINDOW commands are available to control features, window behavior, and screen design.

The syntax for a WINDOW command requires the keyword WINDOW. For some commands, the name of the window is optional. If you do not specify a window in these cases, the active window is assumed by default. You can also use unique truncations for every word in the command.

WINDOW commands are issued from the Command Window, although some have associated PF keys. (You may assign WINDOW commands to PF keys as described in Help Window: Revising PF Key Settings.) Commands that you use often may be stored in your PROFILE FOCEXEC.

Note: In the syntax that follows, the term windowname is used to denote the Command Window, the Output Window, the History Window, the Help Window, or the Error Window.

Commands for Activating a Window

How to:

There are two commands that activate a window: the ACTIVE command and the NEXT command.

Syntax: How to Activate a Window

WINDOW ACTIVE windowname 

When you issue the ACTIVE command from the Command Window, the specified window becomes highlighted and the Command Window becomes deactivated. If the specified window is not displayed on the screen, it appears and overlays existing windows.

For example, to activate the History Window, you would enter:

WINDOW ACTIVE HISTORY

Syntax: How to Activate the Next Window in the Screen Sequence

WINDOW NEXT

Pressing PF12 is equivalent to issuing the NEXT command.

Clearing a Window

How to:

The CLEAR command erases the contents of a window.

Syntax: How to Erase the Contents of a Window

WINDOW CLEAR [windowname]

For example, to clear the Output Window, enter:

WINDOW CLEAR OUTPUT

The contents of the Output Window (including data that is not visible) are erased; data in the History Window is not affected.

Controlling the Output Window

How to:

The following commands control the contents of the Output Window: SET AUTOSCROLL, SET CONTINUE, and SET IMMEDTYPE.

Syntax: How to Automatically Scroll the Contents of the Output Window

WINDOW SET AUTOSCROLL {ON|OFF}
WINDOW SET AUTOSCROLL OFF

where:

ON

Automatically scrolls the Output Window down. If the new set of output will not fit in the remaining window space, the display begins at the top of the Output Window. This value is the default.

OFF

Begins displaying output on the next available line of the Output Window. The window is scrolled only when it is filled.

For example, to prevent the Output Window from automatically scrolling, enter:

WINDOW SET AUTOSCROLL OFF

Syntax: How to Control Data Transmission

WINDOW SET CONTINUE {ON|}

where:

ON

Waits until the executing procedure has finished and transmits data to the Output Window until the next input from the terminal is received (for example, until you press a key), or until there is no more data.

OFF

Pauses when transmitting a stream of data to the Output Window each time the window is filled. To continue the data transmission, press Enter. This value is the default.

For example, if you plan to execute a procedure that generates several screens of output and you do not want FOCUS to pause when the Output Window becomes full, enter:

WINDOW SET CONTINUE ON

In this case, you do not see any data in the Output Window until the entire procedure is completed and FOCUS prompts you for input.

Syntax: How to Control Buffering of Line Mode Output

WINDOW SET IMMEDTYPE {ON|OFF}

where:

ON

Sends all line mode output, such as -TYPE to the Output Window as it is executed, line by line.

OFF

Buffers all line mode output. The output appears in the Output Window as a new full screen. This value is the default.

Customizing Your Screen

How to:

The Terminal Operator Environment screen is built with solid borders to enhance the display on terminals that support this feature. If your terminal does not support solid borders, set the parameter as follows

SET SBORDER=OFF

before entering the Terminal Operator Environment.

There are several window commands that control the layout of windows on the screen and that define the PF keys. You can use these commands to customize the Terminal Operator Environment.

Syntax: How to Remove a Window From the Screen

WINDOW CLOSE [windowname]

For example, if you do not want to see the History Window, enter:

WINDOW CLOSE HISTORY

Your commands are recorded in the History Window even though it is not displayed.

Syntax: How to Display a Closed Window in its Normal Screen Location

WINDOW OPEN [windowname]

The window overlays existing windows. This command does not activate the window. This command also redisplays an opened window that is hidden behind other windows.

For example, to open the closed History Window, enter:

WINDOW OPEN HISTORY

Syntax: How to Move a Window to a New Screen Location

WINDOW MOVE [windowname] location {n|*}

where:

location

Is one of the following:

ROW moves the top border of the window to row n, an absolute position.

COLUMN moves the left border of the window to column n, an absolute position.

LEFT moves the window to the left. If n is specified, the window moves n columns to the left. If asterisk (*) is specified, the left border of the window moves to the left edge of the screen.

RIGHT same as LEFT, but to the right.

UP moves the window up. If n is specified, the window moves up n columns. If asterisk (*) is specified, the top border of the window moves to the top edge of the screen.

DOWN same as UP, but the window moves down and the bottom border becomes the bottom edge of the screen.

n

Is any positive number.

*

Used with LEFT, RIGHT, UP, and DOWN. Moves the window to the edge of the screen.

For example,

To move the History Window up to Row 10, enter:

WINDOW MOVE HISTORY ROW 10

To move the Table Window up 12 rows, enter:

WINDOW MOVE TABLE UP 12

Note:

  • If the specified screen location causes any part of the window to extend past the physical screen, the window is moved only to the edge of the screen.
  • Windows return to their default positions when the FOCUS session is terminated unless the positions are specified in your PROFILE FOCEXEC.

You may also use the PF9 key to position windows. The MOVE CURSOR command is only available as a PF key setting and cannot be issued as a command from the Command Window. The syntax is:

MOVE [windowname] CURSOR

To move a window using PF9, position the cursor at the new location and press PF9. The top left corner of the window is moved to the current cursor position. If the window disappears from the screen, press PF12 to activate it again.

Syntax: How to Control the Length of an Error Message in the Error Window

WINDOW SET ERRORS {SHORT|LONG}

where:

SHORT

Displays the short form: the error number and description.

LONG

Displays the long form: the error number, description, and an explanation. This value is the default.

For example, to display error messages without explanations, enter:

WINDOW SET ERRORS SHORT

Syntax: How to Redefine Key Settings

WINDOW SET key command 

where:

key

Is any PF key.

command

Is any WINDOW or FOCUS command.

If you assign a WINDOW command to a PF key, do not include the WINDOW keyword. For example, to set PF14 to the WINDOW CLOSE command, enter:

WINDOW SET PF14 CLOSE

If you assign a FOCUS command to a PF key, the keyword FOCUS is required. For example, to assign the ? SET query command to the PF4 key, enter:

WINDOW SET PF4 FOCUS ? SET

Note:

  • You can edit the Help Window and immediately change the key settings (see Help Window: Revising PF Key Settings).
  • Key settings change back to their default settings when you end the FOCUS session unless they are defined in the PROFILE FOCEXEC.

Syntax: How to Change the Height or Width of a Window

WINDOW SIZE [windowname] {WIDTH|HEIGHT} {n|*} {MORE|LESS}

where:

WIDTH

Changes the width of the window.

If you alter the width, the right window side is increased or decreased accordingly.

HEIGHT

Changes the height of the window.

If you change the height, the bottom of the window is increased or decreased accordingly.

n

Is any positive number. Indicates an absolute size or a size relative to the existing size if MORE or LESS is specified.

*

Extends the width or height of the window to that of the physical screen.

MORE

Increases the window size by n columns or rows. Not used with asterisk (*).

LESS

Decreases the window size by n columns or rows. Not used with asterisk (*).

For example, to increase the height of the History Window by five rows, enter:

WINDOW SIZE HISTORY HEIGHT 5 MORE

The MORE option indicates relative sizing; omit it for an absolute size. For example, to make the History Window five rows high, enter:

WINDOW SIZE HISTORY HEIGHT 5

Note: If the new window size causes any part of the window to extend beyond the physical screen, the window is sized only to the edge of the screen.

Displaying the Help Window

How to:

The HELP command controls the display of the Help Window. It opens and activates a closed Help Window. Issue this command again to deactivate and close it.

Syntax: How to Display the Help Window

WINDOW HELP

Pressing the PF1 key is equivalent to issuing the HELP command. Press the key once to open the Help Window; press the key again to close it.

Enlarging a Window

How to:

The ZOOM command enlarges a window up to the full size of the screen. It also shrinks an enlarged window to its normal size. The specified window becomes active as a result.

Syntax: How to Enlarge a Window

WINDOW ZOOM [windowname]

Pressing the PF2 key is equivalent to issuing the ZOOM command. Move the cursor and press Enter to activate the window. Then, press PF2.

Note: A blank window results from enlarging a closed Help Window. Display the window first and then issue the ZOOM command.

Recalling Commands

The RECALL command is only available as a PF key setting. Although the RECALL command is the current default for PF6, you may assign

RECALL 

to any PF key. There are two ways to use the PF6 key:

This recalls a command from the History Window to the Command Window. You can edit the command once it is recalled to the Command Window and submit it instead of typing it again. The command remains in the History Window for future use.

Note: A FOCUS request with several subcommands (like a TABLE request) is treated as one command; therefore, the entire request appears when you press PF6.

Routing Window Contents

How to:

The ROUTE command transfers window contents to an allocated file or data set while it continues to display the contents in the window. To stop the routing, issue the ROUTE command again with the OFF option. With this command, you can create a session monitor record or log by routing the History Window or the Output Window to a file.

Syntax: How to Route Window Contents

WINDOW ROUTE [windowname] {TO ddname|OFF}

where:

ddname

Is any valid ddname.

OFF

Will stop routing data to the ddname.

For example, to route History Window contents to a file allocated to ddname SESSION, enter:

WINDOW ROUTE HISTORY TO SESSION

Note: You must issue an ALLOCATE command before you issue the ROUTE command; space allocation is not set dynamically. The ddname should be allocated to a sequential data set with LRECL 132 and RECFM F.

Scrolling Window Contents

How to:

The SCROLL command moves the window contents when data extends beyond the window border and the MORE message or right and left indicators (< or >) appear. You can scroll a window in any direction.

Syntax: How to Scroll Window Contents

WINDOW SCROLL [windowname] direction 

where:

direction

Is one of the following:

FORWARD scrolls the window down; also available as the PF8 key.

BACKWARD scrolls the window up; also available as the PF7 key.

TOP scrolls the window to the top line; also available as the PF4 key.

BOTTOM scrolls the window to the bottom line; also available as the PF5 key.

LEFT scrolls the window left; also available as the PF10 key.

RIGHT scrolls the window right; also available as the PF11 key.

Note:

  • Using the PF key instead of entering the SCROLL command from the Command Window is recommended, as the automatic autoscroll feature might override your explicit SCROLL command.
  • You may also scroll the Output Window forward with the PA2 or CLEAR key while you are working in another active window.

Information Builders