Valid in: | DATA step |
Category: | Window Display |
Type: | Declarative |
BLACK | MAGENTA |
BLUE | ORANGE |
BROWN | PINK |
CYAN | RED |
GRAY | WHITE |
GREEN | YELLOW |
libref.catalog.keys-entry
To create a set of function key definitions for a window, use the KEYS window. Define the keys as you want, and use the SAVE command to save the definitions in the SASUSER.PROFILE catalog or in a SAS library and catalog that you specify.
libref.catalog.pmenu-entry
You can specify multiple field-definitions.
A group contains all fields in a window that you want to display at the same time. Display various groups of fields within the same window at different times by naming each group. Choose the group to appear by specifying window.group in the DISPLAY statement.
Specifying several groups within a window prevents repetition of window options that do not change and helps you keep track of related displays. For example, if you are defining a window to check data values, arrange the display of variables and messages for most data values in the data set in a group that is named STANDARD. Arrange the display of different messages in a group that is named CHECKIT that appears when data values meet the conditions that you want to check.
Enclose expression in parentheses.
Enclose expression in parentheses.
To allow a variable value in a field to be displayed but not changed by the user, use the PROTECT= option (described later in this section). You can also protect an entire window or group for the current execution of the DISPLAY statement by specifying the NOINPUT option in the DISPLAY statement.
If a field definition contains the name of a new variable, that variable is added to the data set that is being created (unless you use a KEEP or DROP specification).
If a field can both display a variable and accept input, you must either specify the informat in an INFORMAT or ATTRIB statement or use a SAS format such as $CHAR. or TIME. that has a corresponding informat.
If a format is specified, the corresponding informat is assigned automatically to fields that can accept input.
A format and an informat in a WINDOW statement override an informat and a format that are specified elsewhere.
You cannot enter a value in a field that contains a character string.
BLINK | causes the field to blink. |
HIGHLIGHT | displays the field at high intensity. |
REV_VIDEO | displays the field in reverse video. |
UNDERLINE | underlines the field. |
ATTR=(highlighting-attribute-1,...)
The highlighting attributes that are available depend on the type of monitor that you use.
YES | specifies that the cursor moves automatically to the next unprotected field. |
NO | specifies that the cursor does not move automatically. |
BLACK | MAGENTA |
BLUE | ORANGE |
BROWN | PINK |
CYAN | RED |
GRAY | WHITE |
GREEN | YELLOW |
COLOR= has no effect on monochrome monitors.
YES | specifies that SAS displays characters in a field as you type them in. |
NO | specifies that the entered characters are not displayed. |
YES | specifies that each execution of the DISPLAY statement displays all previously displayed contents of the field as well as the contents that are scheduled for display by the current DISPLAY statement. If the new contents overlap persisting contents, the persisting contents are no longer displayed. |
NO | specifies that each execution of a DISPLAY statement displays only the current contents of the field. |
YES | specifies that you cannot enter information. |
NO | specifies that you can enter information. |
NO | specifies that you can leave the field blank. |
YES | specifies that you must enter a value in the field. |
data _null_; window start #9 @26 'WELCOME TO THE SAS SYSTEM' color=black #12 @19 'THIS PROGRAM CREATES' #12 @40 'TWO SAS DATA SETS' #14 @26 'AND USES THREE PROCEDURES' #18 @27 'Press ENTER to continue'; display start; stop; run;
libname category 'SAS-library';
data Assignment;
set category.article end=final;
drop a b j s o;
window Assignment irow=1 rows=12 color=white
#3 @10 'Article:' +1 art protect=yes
'Name:' +1 name $14.;
window Showtotal irow=20 rows=12 color=white
group=subtotal
#1 @10 'Adams has' +1 a
#2 @10 'Brown has' +1 b
#3 @10 'Johnson has' +1 j
#4 @10 'Smith has' +1 s
#5 @10 'Other has' +1 o
group=lastmessage
#8 @10
'ALL ARTICLES ASSIGNED.
Press ENTER to stop processing.';
display Assignment blank;
if name='Adams' then a+1;
else if name='Brown' then b+1;
else if name='Johnson' then j+1;
else if name='Smith' then s+1;
else o+1;
display Showtotal.subtotal blank noinput;
if final then display Showtotal.lastmessage;
run;
data _null_; array row{3} r1-r3; array col{3} c1-c3; input row{*} col{*}; window One rows=20 columns=36 #1 @14 'PERSIST=YES' color=black #(row{i}) @(col{i}) 'Hello' color=black persist=yes; window Two icolumn=43 rows=20 columns=36 #1 @14 'PERSIST=NO' color=black #(row{i}) @(col{i}) 'Hello' color=black persist=no; do i=1 to 3; display One; display Two; end; datalines; 5 10 15 5 10 15 ;
if _cmd_ ne ' ' then _msg_='CAUTION: UNRECOGNIZED COMMAND' || _cmd_;
CAUTION: UNRECOGNIZED COMMAND command
Command is
the erroneous windowing command.
data new; length name $20; window start #3 @20 'Type the variable name' #4 @20 'and press the Enter key.' #7 'Name:' +1 name attr=underline #11 'When you are finished entering variable names, type "end"' #12 'at the command line.'; display start; run; proc print; run;