WINDOW Statement |
The WINDOW statement defines and opens a window on the display and can include a number of fields. The DISPLAY statement actually writes values to the window. The following fields can be specified in the WINDOW statement:
specifies a name 1 to 8 characters long for the window. This name is displayed in the upper left border of the window.
closes the window.
control the size, position, and other attributes of the window. The attributes can also be changed interactively with window commands such as WGROW, WDEF, WSHRINK, and COLOR. A description of the window options follows.
starts a repeating sequence of groups of fields defined for the window. The group-name specification is a name 1 to 8 characters long used to identify a group of fields in a later DISPLAY statement.
are a sequence of field specifications made up of positionals, field operands, formats, and options. These are described in the next section.
The following window options can be specified in the WINDOW statement:
specifies the name of a variable in which the command line entered by the user will be stored.
specifies the background color for the window. The operand is either a quoted character literal, a name, or an operand. The valid values are "WHITE," "BLACK," "GREEN," "MAGENTA," "RED," "YELLOW," "CYAN," "GRAY," and "BLUE." The default value is "BLACK."
specifies the starting number of columns for the window. The operand is either a literal number, a variable name, or an expression in parentheses. The default value is 78 columns.
specifies the initial starting column position of the window on the display. The operand is either a literal number or a variable name. The default value is column 1.
specifies the initial starting row position of the window on the display. The operand is either a literal number or a variable name. The default value is row 1.
specifies the message to be displayed on the standard message line when the window is made active. The operand is almost always the name of a variable, but a character literal can be used.
determines the starting number of rows of the window. The operand is either a literal number, the name of a variable that contains the number, or an expression in parentheses that yields the number. The default value is 23 rows.
Both the WINDOW and DISPLAY statements accept field specifications, which have the following general form:
The arguments to these statements are as follows:
are directives determining the position on the screen to begin the field. There are four kinds of positionals; any number of positionals are accepted for each field operand.
specifies the row position; that is, it moves the current position to column 1 of the specified line. The operand is either a number, a name, or an expression in parentheses.
specifies that the current position move to column 1 of the next row.
specifies the column position. The operand is either a number, a name, or an expression in parentheses. The @ directive should come after the # position if # is specified.
specifies a skip of columns. The operand is either a number, a name, or an expression in parentheses.
is a character literal in quotes or the name of a variable that specifies what is to go in the field.
is the format used for display, the value, and the informat applied to entered values. If no format is specified, then the standard numeric or character format is used.
specify the attributes of the field as follows:
specifies that the field is protected; that is, you cannot enter values in the field. If the field operand is a literal, it is already protected.
specifies the color of the field. The operand is a literal character value in quotes, a variable name, or an expression in parentheses. The colors available are "WHITE," "BLACK," "GREEN," "MAGENTA," "RED," "YELLOW," "CYAN," "GRAY," and "BLUE." Note that the color specification is different from that of the corresponding DATA step value because it is an operand rather than a name without quotes. The default value is "BLUE."