Working with SAS Windows

Opening Windows

The SAS windowing environment has numerous windows that you can use to complete tasks. You can enter commands to open windows. For more information about how to execute commands, see Using SAS Windowing Environment Command Types.
You can use the following commands to open a window and make it active.
Table 41.3 Window Commands
Window Command
Window Name
AF C=library.catalog.entry.type
Build
DMFILEASSIGN
File Shortcut Assignment
DMLIBASSIGN
New Library
EDOP
Editor Options
EXPFIND
Find
EXPLORER
Explorer
FOOTNOTES
Footnotes
FSBROWSE
FSBrowse
FSEDIT
FSEdit
FSFORM formname
FSForm
FSVIEW
FSView
HELP
Help
KEYS
Keys
LOG
Log
NOTEPAD, NOTE
Notepad
ODSRESULTS
Results
ODSTEMPLATES
Templates
OPTIONS
Options
OUTPUT, LISTING, LIST, LST
Output
PROGRAM, PGM, PROG
Program Editor
REGEDIT
Registry Editor
REPOSMGR
Repository Manager
SASENV
Explorer (Contents Only view)
SETPASSWORD
Password
TITLES
Titles
VAR
Properties
You can use window commands at any command prompt. You might find it helpful to use multiple window commands together.
For example, from the Log window, the following string of commands changes the active window, maximizes it, and changes the word paint to print:
pgm; zoom; change paint print
The following display shows that the cursor immediately moves to the Editor, which has been maximized to fill the entire display (due to the ZOOM command). The word paint has been changed to print, and the cursor rests after the last character of that text string.
Display 41.3 Executing a Window-Call Command in a Series
Executing a Window-Call Command in a Series

Managing Windows

Window management commands enable you to access and use windows more efficiently. The following list includes the commands that you might use most often when managing windows:
BYE
ends a SAS session.
CLEAR
removes all text from an active window.
END
closes a window. In the Editor, this command acts like the SUBMIT command.
NEXT
moves the cursor to the next open window and makes it active.
PREVWIND
moves the cursor to the previous open window and makes it active.
RECALL
returns statements that are submitted from a text editor window (such as the Editor or SAS NOTEPAD) to the text editor.
ZOOM
enlarges a window to occupy the entire display. Execute it again to return a window to its previous size. This command is not available in all operating environments.

Scrolling Windows

Scrolling commands enable you to maneuver within text, and the command names indicate what they do. They include the following:
BACKWARD
moves the contents of a window backward.
FORWARD
moves the contents of a window forward.
LEFT
moves the contents of a window to the left.
RIGHT
moves the contents of a window to the right.
TOP
moves the cursor to the first character of the first line in a window.
BOTTOM
displays the last line of text.
HSCROLL, VSCROLL
HSCROLL determines the amount that you move to the left or right when using the LEFT or RIGHT commands. VSCROLL determines the amount that you move forward or backward when using the FORWARD or BACKWARD commands.
Use the following options with the HSCROLL and VSCROLL commands as needed. HALF is the default scroll amount.
PAGE
is the entire amount that shows in the window.
HALF
is half the amount that shows in the window.
MAX
is the maximum portion to the left or right or to the top or bottom that shows in the window.
n
is n lines or columns, where n is the number that you specify.
CURSOR
When used with HSCROLL, the cursor moves to the left or right of the display, when the LEFT or RIGHT command is executed.
Note: This option is valid only in windows that allow editing.
When used with VSCROLL, the cursor moves up and down when the FORWARD and BACKWARD command is executed.

Example: Scrolling Windows

To set the automatic horizontal scrolling value to five character spaces, specify
hscroll 5
Now, when you execute the LEFT or RIGHT command, you move five character spaces in the appropriate direction. If you want to set the automatic vertical scrolling value to half a page, then specify
vscroll half
Then, when you execute the FORWARD command, half of the previous page remains on the display and half of a new page is scrolled into view.
If you need to scroll a specific number of lines forward or backward, then use the scroll amount on the FORWARD command to temporarily override the default scrolling value. You can specify scrolling values with the BACKWARD and FORWARD commands and the LEFT and RIGHT commands.

Changing Colors and Highlighting in Windows

SAS gives you a simple way to customize your environment if your display supports color. You can change SAS windowing environment colors with the COLOR command. You can also change SAS code color schemes by using the SYNCONFIG command. To change windowing environment colors, simply specify the COLOR command followed by the field or window element that you want changed, and the desired color. You might also be able to change highlighting attributes, such as blinking and reverse video.
For example, to change the border of a window to red, specify
color border red
This changes the border to red.
Other available colors are blue, green, cyan, pink, yellow, white, black, magenta, gray, brown, and orange. If the color that you specify is not available, then SAS attempts to match the color to its closest counterpart.
Some color selections are valid only for certain windows.
For more information, see the online Help for the SASColor window. You can access the SASColor window with the SASCOLOR command.
You can also change the color scheme of text in the windows in which you enter code, such as the Editor window and NOTEPAD. This is useful, because you can make different elements of the SAS language appear in different colors, which makes it easier to parse code. To change the color scheme for code, use the SYNCONFIG command. The SYNCOLOR command toggles color coding off and on in these windows.
For more information about changing the color schemes for windows in which you create and edit code, see the online Help that is available when you issue the SYNCONFIG command.

Finding and Changing Text

Often, you might want to search for a character string and change it. You can locate the character string by specifying the FIND command and then the character string. Then the cursor moves to the first occurrence of the string that you want to locate. Remember to enclose a string in quotation marks if CAPS ON is in effect.
You can change a string by specifying the CHANGE command, then a space and the current character string, and then a space and the new character string. Remember to enclose in quotation marks any string that contains an embedded blank or special characters. For both the FIND and CHANGE commands, the character string can be any length.
With both the FIND and CHANGE commands, you can specify the following options to locate or change a particular occurrence of a string:
  • ALL
  • FIRST
  • ICASE
  • LAST
  • NEXT
  • PREFIX
  • PREV
  • SUFFIX
  • WORD
For details about which options you can use together, see SAS System Options: Reference. Note that the option ALL finds or changes all occurrences of the specified string. In the following example, all occurrences of host are changed to operating environment:
change host 'operating environment' all
To resume the search for a string that was previously specified with the FIND command, specify the RFIND command. To continue changing a string that was previously specified with the CHANGE command, specify the RCHANGE command. To find the previous occurrence of a string, specify the BFIND or FIND PREV command; you can use the PREFIX, SUFFIX, and WORD options with the BFIND command.

Cutting, Pasting, and Storing Text

With the cut and paste facility, you can do the following:
  • Identify the text that you want to manipulate.
  • Store a copy of the text in a temporary storage place called a paste buffer.
  • Insert text.
  • List the names of all current paste buffers or delete them.
You can manipulate and store text by using the following commands:
MARK
identifies the text that you want to cut or paste.
CUT
removes the marked text from the display and stores it in the paste buffer.
STORE
copies the marked text and stores it in the paste buffer.
PASTE
inserts the text that you have stored in the paste buffer at the cursor location.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.218.28