Chapter Contents

Previous

Next
Command Directory

window

Perform Window Management Functions

ABBREVIATION
wi{ndow}

FORMAT
window SUBCOMMAND [WINDOW-FIND] [WINDOW-NAME] [SUBCOMMAND-PARAMETERS]

DESCRIPTION
The window command is used to perform a wide variety of window management functions. Furthermore, it may be issued three ways in line mode and five ways in full-screen mode:


The window command is always issued with a SUBCOMMAND argument, and sometimes with parameters to the subcommand, SUBCOMMAND-PARAMETERS. The subcommands that are available to you depend on how you issue the command. window Subcommands lists the subcommands and where they are valid.

window Subcommands
Subcommand PROFILE Configuration
File
Command
Window
Line
Mode
autopop
no yes yes no
border
no yes yes no
clear
no no yes no
close
no no yes no
color
no yes yes no
config
no yes no no
context
no yes yes no
find
no no yes no
memory
no yes no no
move
no no yes no
next
no no yes no
off
yes no yes no
on
no yes yes no
open
no yes yes no
previous
no no yes no
resize
no no yes no
scroll
no yes (table note 1)
yes no
top
no no yes no
trace
no yes yes no
zoom
no no yes no

TABLE NOTE 1:   Format 2 of the scroll subcommand cannot be specified in the configuration file. [arrow]

Each of these subcommands is described in detail later in this section.

WINDOW-NAME argument
Some of these subcommands must be used with a WINDOW-NAME argument, which is used to specify the window to which the command applies. If WINDOW-NAME is required, it must be one of the following:


< > is used as a placeholder to specify the window the cursor is in. As < > is used interactively, it may not be specified in window commands present in the configuration file. Any further restrictions are mentioned in the discussions of the various subcommands.

The windows that can be specified with the WINDOW-NAME argument fall into four classes:

In Class 1 these windows are always present:


In Class 2 these windows are under debugger control for error correction or reporting:


In Class 3 you control the presence of these windows; there can be one instance only of each:


In Class 4 you control the presence of these windows; there can be multiple instances of each:


In window subcommands that permit a Class 4 name, the name can be specified only if it unambiguously identifies the window. For example, if there are two Dump windows open, the following command is ambiguous:

window close dump

However, the same command would not be ambiguous if only one Dump window was open.

To close a Dump window in the situation where two or more Dump windows are open, you can position the cursor in the window and press the PF15 key, which is assigned the following window command by default:

window close < >

Or, you could type this command in the Command window and then move the cursor into the window before issuing it with the ENTER key.

WINDOW SUBCOMMANDS
Each of the window subcommands is discussed in detail in the following paragraphs.

autopop
The autopop subcommand is used to select the autopop status for a window. (This can also be accomplished with the Config window.) Autopop status is either on or off. If the autopop status is set to on, the window is automatically made the top window; that is, the window is popped to the top and the cursor is placed inside the window whenever output is sent to the window, provided the window is at least partially obscured. If the window is completely unobscured, autopop does not cause the window to become the top window. If specified for windows for which there can be multiple instances, the attribute applies to all instances.

The format of the autopop subcommand is as follows:

autopop WINDOW-NAME on|off

The WINDOW-NAME argument specifies the window that is to have its autopop status set, and the on/off argument sets the status. For example, the following command will set the autopop status of the Dump window to on:

window autopop dump on

In a configuration file, the WINDOW-NAME argument can be any class of window; however, when issued during a session from the Command window or a PF key, WINDOW-NAME must be Class 1 or 3, or the <> placeholder. If the autopop status of a Class 4 window is changed during your session, the new status applies only to the specific window to which the command was applied. The autopop status in the Config window must be used to change the status for any future instances of this type of window.

By default, autopop is off for all windows except the following:

border
This subcommand specifies the characters to be used to form the borders of windows with borders. The format of the border subcommand is as follows:

border "STRING"

The six characters used to make up the border are specified as the STRING argument in the form of a string literal. For example, the following STRING argument specifies the characters "++++|-" :

window border "++++|-"

The first four characters are used for the four corners (top left, top right, bottom right, and bottom left). The fifth is used for the vertical borders, and the last for the horizontal borders. If this command is not present, or if a null-string is present, the debugger uses suitable default characters. Border color is controlled by the first C-A-I-TRIPLET in the window color command associated with that window. (See the color subcommand later in this section.)

clear
The clear subcommand clears the Command, Log, or Termout windows. The format of the clear subcommand is as follows:

clear WINDOW-NAME

This command cannot be issued from a configuration file and WINDOW-NAME must be either Command, Log, or Termout. For example, during a session you can issue the following command to clear the Log window:

window clear log

close
The close subcommand can be used to close any Class 3 or 4 window. This subcommand is not valid in a configuration file and can only be used during a full-screen session. The format of the close subcommand is as follows:

close WINDOW-NAME

For example, to close the Register window, you can issue the following command:

window close register

If this command is used to close a Class 4 window (Dump or Print), there must be only one active instance of the window. Or you must use the <> placeholder character in the command and specify the desired window to close by positioning the cursor within its borders. For example, if you have two Print windows open, you can enter the following command in the Command window, and then, before you press the ENTER key, position the cursor in the Print window you want to close.

window close < >

When you press the ENTER key, the command is issued and the Print window is closed.

color
This subcommand is used to set the color, attribute, and intensity of the named window. The Configuration window is normally used to control these settings; however, the color subcommand can also be entered from the Command window or typed directly into a configuration file. The format of the color subcommand is as follows:

color WINDOW-NAME C-A-I-TRIPLET C-A-I-TRIPLET . . .

The WINDOW-NAME argument can be any valid window name. The C-A-I-TRIPLET arguments are used to specify the color, attributes, and intensity of each area of a window, including the border, which is customizable. One C-A-I-TRIPLET is required for each area of the window.

The first position of the C-A-I-TRIPLET triplet specifies the color of the area and can be any of the following:


The second position of the C-A-I-TRIPLET specifies the display attribute for the area and can be any of the following:


The third position of the C-A-I-TRIPLET specifies the intensity of the area and can be either of the following:


C-A-I-TRIPLETs are specified using the first letter of each component. For example, "r b l" specifies a red, blink, low triplet. You can also use a colon to specify that a characteristic in the C-A-I-TRIPLET not be changed. For example, ": r h" specifies current color, reverse video, and high intensity.

Specifying colors, attributes, or intensities on terminals that do not have the support causes the setting to be ignored.

C-A-I-TRIPLET Arguments by Window shows how many triplets are required for each window and what they are used for.

C-A-I-TRIPLET Arguments by Window
Window Number of
Triplets
Areas Affected Protected?
Command





3 Command window border

Cdebug: prompt

command line input area

yes

yes

no

Config





3 Config window border

titles and protected text

unprotected text

yes

yes

no

Dump






4 Dump window border

various prompts

dump parameters

hex and character dump

yes

yes

no

yes

Help



1 Help window border yes
Keys





3 Keys window border

key names

ISPF? and key definitions

yes

yes

no

Log







5 Log window border

debugger output

echoed commands

echoed terminal input

echoed terminal output

yes

no

no

no

no

Message




2 Message window border

message

yes

yes

Popup






4 Popup window border

message

prompt

input area

yes

yes

yes

no

Print






4 Print window border

various prompts

print parameters

value of expression printed

yes

yes

no

yes

Register




2 Register window border

register names and values

yes

yes

Source







5 Source window border

various prompts

module name and line number

line number and text areas

line stopped at

yes

yes

no

no

no

Status







5 Status window border

help information

reason for break

run scope

command scope

yes

yes

yes

yes

yes

Termin







5 Termin window border

various prompts

various settings

"Read..."/"Cont..." prompt

input area

yes

yes

no

yes

no

Termout







5 Termout window border

various prompts

various settings

"More..." prompt

output area

yes

yes

no

yes

yes

Watch







5 Watch window border

various prompts

watch parameters

drop prefix area

watch name and value

yes

yes

no

no

yes

When using the color subcommand, you must provide the number of C-A-I-TRIPLET arguments shown in the second column of C-A-I-TRIPLET Arguments by Window. For example, the Keys window requires three C-A-I-TRIPLET arguments to set the characteristics of the border, key name pad, and key definition text pad as follows:

window color keys m r l y n l r n l

When issued from the Command window or the config file, this command sets the following Keys window characteristics:

border
magenta, reverse video, low intensity

key name pad
yellow, none, low intensity

key definition pad
red, none, low intensity


In this example, both the border and key name pad are protected fields, which means that they do not accept user input. However, for the Keys window, the key definition text pad is not protected and does allow input.

config
This subcommand is used to configure, establish the initial size and position of, the named window. The Config window is normally used to control these settings; however, the config subcommand can also be typed directly into a configuration file. The format of the config subcommand is as follows:

config WINDOW-NAME position ROW-POS COL-POS size HEIGHT WIDTH border|noborder

The WINDOW-NAME argument can be any valid window name. The ROW-POS and COL-POS arguments, which must follow the position keyword, are used to specify the position of the upper-left corner of the window. Window size is controlled by the HEIGHT and WIDTH arguments, which also must follow the appropriate keyword, size. The border or noborder keyword is used to turn the window border either on or off.

For window position arguments, the top left corner of the screen is considered to be the origin (0,0). ROW-POS and COL-POS are integers representing the row and column position of the top left corner of the window. HEIGHT and WIDTH, which are also integers, represent the size of the window in terms of rows and columns. Borders, if any, must be included in the size.

Any of ROW-POS, COL-POS, HEIGHT, or WIDTH arguments can be allowed to assume a default value for the window if you specify a colon instead of an integer. If the values specified cause the window to be placed outside the screen (exceed screen dimensions), the position and size is adjusted accordingly. If either the ROW-POS or HEIGHT argument is specified as an integer, it is not advisable to specify a colon for the other argument. The default assumed by the debugger may cause ROW-POS or HEIGHT to be forcibly adjusted to meet screen dimensions. However, WIDTH and COL-POS defaults will not be affected. Similarly, it is not advisable to specify only one of the COL-POS and WIDTH arguments and use the default for the other.

If the configuration is saved, actual values are written out even if defaults were specified (with a colon) in the original window config command. The only exceptions are certain parameters of the following windows:

Dump window
Window height is specified at configuration time.

Print window
Window height is specified at configuration time.

Message window
The default colon symbol appears for ROW-POS and COL-POS if they were not specified.

The HEIGHT argument is ignored. If a ROW-POS argument is specified, the window appears on that row; otherwise, it is centered vertically. If a COL-POS argument is specified, the window appears on that column; otherwise, it appears centered horizontally. The height is based on the amount of text in the message.

Popup window
The default colon symbol appears for COL-POS if it was not specified.

The HEIGHT and WIDTH arguments are ignored. If a ROW-POS argument is specified, the window appears on that row; otherwise one of the rows in the middle of the screen is used. If a COL-POS argument is specified, the window appears on that column; otherwise it is centered vertically.

all other windows
Various name-dependent restrictions imposed for the height and width of a window are shown in Window Size Defaults and Restrictions (terminal height in rows = H, terminal width in columns = W). The maximum height and the maximum width of these windows is screen height and screen width.

Window Size Defaults and Restrictions
Window Min.
Height
Def.
Height
Max.
Height
Min.
Width
Def.
Width (table note 1)
Max.
Width
Def.
Border
Command 1 1 1 24 W W no
Config 3 H 104 12 W 84 yes
Dump 5 H/2 H 51 W W yes
Help 4 H/2 H 20 W W yes
Keys 3 14 27 12 80 94 yes
Log 3 .45X(th-2) H 10 W W yes
Print 5 H/2 H 49 W W yes
Register 3 11 11 (table note 2) 8 75 75 yes
Source 4 rest (table note 3) H 32 W W yes
Status 1 1 1 10 W W no
Termin 5 5 5 (table note 4) 30 W W yes
Termout 5 H/2 H 20 W W yes
Watch 5 H/3 H 20 W W yes

TABLE NOTE 1:   If the terminal width is greater than the maximum width, then the default width is the maximum width. [arrow]

TABLE NOTE 2:   This assumes default border. [arrow]

TABLE NOTE 3:   rest = terminal-height - (command-window-height + log-window-height + status-window-height) [arrow]

TABLE NOTE 4:   This assumes default border and scale. [arrow]

If there is no window config command for a particular window in the configuration file, or if the command contains a syntax error, default parameters are used.

context
This subcommand controls the amount of context information provided by source lines around the highlighted line in the Source window. The format of the context subcommand is as follows:

context source N M

Except when near the top or near the bottom of a file, the debugger maintains a minimum of N source lines around (above and below) the highlighted line. If the window height is less than 2*N+1, it is not physically possible to do this; in such cases the debugger maintains as much context as possible. N can take any value between 0 and 254. To specify the default value, which is 2, use a colon.

The M argument determines when the highlighted line is centered to maximize context information. If the next line to be highlighted is at least M lines above the top or M lines past the bottom of the window, it is centered. M can take any value between 0 and 0x7fffffff. To specify the default value, which is 10, use a colon.

find
The window find subcommand is used to search for strings and is supported in the following windows:


The following format is used with the window find subcommand:

window find WINDOW-NAME

The WINDOW-NAME argument can be any of the following:

If the <> WINDOW-NAME argument is used, the position of the cursor determines the window to which the command is applied. If a window name is specified as the window-name argument, the position of the logical cursor is used to determine the starting point of the search, if the search is cursor dependent.

intercepts
This subcommand specifies the status of the input and the output intercepts and the processing of intercepted input or output. The format of the intercepts subcommand is as follows:

intercepts "STRING"

The STRING argument is eight characters long; each position controls one intercept. intercepts Subcommand STRING Argument lists the meaning of each position and the valid values for each character.

intercepts Subcommand STRING Argument
Position Significance Value Meaning Default
1 input intercept y

n

input intercepted

not intercepted

y
2 input logging y

n

input logged

not logged

n
3 input scale y

n

scale present

not present

y
4 output intercept y

n

output intercepted

not intercepted

y
5 output logging y

n

output logged

not logged

n
6 output display n

y

i

do not display

display

display immediately

i
7 output pause y

n

pause when screen is full

do not pause

y
8 output scale y

n

scale present

not present

y

memory
This subcommand allocates memory for the buffers of the Command, Log, and Source windows. The format of the memory subcommand is as follows:

memory MEMBRW MEMCMD MEMLOG MEMSRC

The MEMBRW argument specifies the memory allocated to the Browse window, MEMCMD for the Command window, MEMLOG for the Log window, and MEMSRC for the Source window. MEMCMD Argument Values lists the default and minimum memory sizes in bytes for each of these windows (H=terminal height).

MEMCMD Argument Values
Window Minimum Memory Default Memory
Browse 255 * H max (255 * H, 6000)
Command 360 1000
Log 1000 12000
Source 255 * H max (255 * H, 12000)

move
This subcommand is used to move windows during a session. The format of the move subcommand is as follows:

move WINDOW-NAME

The WINDOW-NAME argument must be < >. Place the cursor on the window to be moved and execute the command. This puts the debugger in move mode; MOVE appears at the bottom right corner of the window being moved. Move the cursor in the new location for the window, and then press any PF key or ENTER to terminate move mode, reposition the window, and resume normal operation.

next
As explained in Some Window Basics, the debugger uses a stack to keep track of open windows. You can move through this stack of windows in either direction. The next subcommand moves the top window to the bottom of the stack. Thus, the next window below the window just moved becomes the top window. The format of the next subcommand is as follows:

next

See previous subcommand for comparison.

off
This subcommand is used to terminate full-screen mode. The format of the off subcommand is as follows:

off

It has no effect if the debugger is in line mode. When this command is processed, all other unprocessed input is discarded with the exception of other commands on the same line as the window off command; these are processed in line mode. (See the on subcommand.)

on
This subcommand switches to full-screen mode. The format of the on subcommand is as follows:

on

The configuration used is determined by the configuration last in effect (default configuration, if entering full-screen mode for the first time), modified by any config subcommands. If you are re-entering full-screen mode, the state of the following windows will be the same as when the off subcommand was specified:


Only class 1 type windows will reappear.

The on subcommand has no effect if you are already in full-screen mode.

Any other command specified on the same line as the window on command in line mode is ignored.

open
This subcommand opens the named window using the parameters in effect for it. The format for the open subcommand is as follows:

open WINDOW-NAME

WINDOW-NAME can be any Class 3 or 4 window. If it is a Class 3 window, it is automatically made the top window. Window classes are discussed earlier in this section.

previous
As explained in Some Window Basics, the debugger uses a stack to keep track of open windows. You can move through this stack of windows in either direction. The previous subcommand positions the bottom window at the top of the stack and makes it the top window. The format of the previous subcommand is as follows:

previous

See next subcommand for comparison.

resize
This subcommand is used to resize a window during a full-screen session. The format of the resize subcommand is as follows:

resize WINDOW-NAME

The WINDOW-NAME argument must be < >. Place the cursor on the window to be moved and execute the command. This puts the debugger in resize mode; RESIZE appears at the bottom right corner of the window being moved. Move the cursor appropriately, and then press any PF key or ENTER to terminate resize mode, reposition the window, and resume normal operation.

The debugger uses an algorithm to determine the new size for the window. The window is divided into equal, or nearly equal, quarters. To expand or contract the window, window edges closest to the original cursor point are moved so that they are the same distance from the terminating cursor point as they were from the original cursor point. If the original cursor point is equidistant from either the right or left edge, or the top or bottom edge, then the edge closest to the terminating point is chosen. However, if the terminating point is still equidistant, then growth or shrinkage occurs in only one dimension.

scroll
The scroll subcommand has two formats:
Format 1: scroll amount SCROLL-AMOUNT
Format 2: scroll WINDOW-NAME up/down/right/left

Format 1 is used to set the scroll amount, and Format 2 is used to scroll a window. Format 2 cannot be used in a configuration file.

Valid values for the SCROLL-AMOUNT argument are


All amounts except for max can be set in a configuration file. However, you can specify any of the values, including max, in the Config window and then issue the appropriate window scroll command using any of the methods described. The debugger scrolls by max.

Format 2 scrolls the window named by the WINDOW-NAME argument. The amount scrolled is determined by the scroll amount in the Status window. The following windows may be scrolled up and down:


The following windows may be scrolled left and right:


Format 2 of the scroll subcommand can also be used to change command scope. By issuing a window scroll < > up or a window scroll status up command, the command scope can be moved up in the calling sequence. Similarly, the down keyword causes command scope to be moved down in the calling sequence. See Using the Status Window more information.

The WINDOW-NAME argument can be any of these windows or the < > placeholder.

The logical cursor moves with the text being scrolled; cursor movement is naturally limited by window boundaries. The amount scrolled is determined by the scroll amount specified in the Status window. If the scroll amount is cursor, the position of the logical cursor is used to determine the scroll amount.

top
This subcommand positions the named window at the top of the stack. The format of the command is as follows:

top WINDOW-NAME

The WINDOW-NAME argument can be any valid window name or < >. The physical cursor appears in this window at the place of the logical cursor when it becomes the top window. (See also the next and previous subcommands.)

trace
This subcommand controls the production of trace lines in the Log window. The format of the trace subcommand is as follows:

trace log on|off

The window trace log subcommand is off by default. If turned on, trace lines are produced in the following cases (similar to when the debugger produces a trace or list line in line mode):


This subcommand also controls the production of the "context of ..." message at prologue and epilogue hooks, which appears only when the debugger gives you control.

The window trace subcommand has no control over trace lines produced by the trace command; such lines are produced irrespective of the setting of this command.

zoom
This subcommand zooms the named window to fill the screen; if already zoomed, it unzooms the window. The format of the zoom subcommand is as follows:

zoom WINDOW-NAME


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.