Working Within SAS

Using the Cursor

To toggle between insert and typeover mode, press the INSERT key. The cursor appears as a rectangular block in typeover mode, whereas in insert mode it appears as a slender bar, called an I-beam. You can change the default cursor setting by opening the Preference dialog box (Tools/Options/Preferences...) and choosing the option you want and saving it.

Using Icons

Each SAS window (e.g. EDITOR, OUTPUT) has an icon associated with it. When a window is minimized, its icon appears at the bottom of the SAS AWS. You can activate these windows by clicking the icon. If it is obscured by other open windows you can activate it by selecting its name from the SAS AWS Windows pull-down menu. To make it active, either click open or select it from the SAS AWS Windows menu. You can add your icons to the SAS System using the USERICON system option. Refer to SAS Companion for the Microsoft Windows Environment for details.

Using the Enhanced Editor

Instead of using the Program Editor like in the earlier versions of SAS, SAS for Windows Version 8 features the Enhanced Editor. The Enhanced Editor (in the Editor window) is an ASCII editor that uses visual aides to help you write and debug your SAS programs. SAS program elements are color-coded, including procedures, keywords, informats and formats, dates, numeric and string constants, macro keywords, undefined keywords, and more.

Line Numbers

In the EDITOR window the line numbers are turned off by default. You can turn the line numbers on by selecting the path Tools/Options/Enhanced Editor...from the Windows AWS menu.

Cursor Movement

The cursor movement keys (e.g., up, down, left, right, PgDn, PgUp) function the same way in the EDITOR window as they do in other Windows applications. Pressing the CTRL key with the right or left arrow key causes the cursor to move forward or backward one word at a time on a given line. Pressing the HOME key causes the cursor to go to the beginning of the current line.

Tab Key

Many text editors retain tab characters, while others expand tabs into space characters. The EDITOR window expands tabs into space characters. Pressing the TAB key inserts spaces and moves any text to the right of the cursor to the right.

Line Breaks

Pressing the ENTER key creates a line break.

Marking Text

When the SHIFT key is used with the cursor movement keys, characters are marked. The marking of an area of text continues until a key that is not a cursor movement key is pressed. Pressing an unshifted cursor also ends the marked area.

If characters are marked and you start typing text, the marked area is replaced with the new text. This occurs even if you have moved the cursor away from the marked area.

Deleting Text

The DELETE key deletes a marked area of text if one exists; otherwise, the character to the right of the cursor is deleted. If the cursor is located past the last text character on the line, the next line is concatenated onto the end of the line containing the cursor.

Using the Clipboard

The Windows Clipboard utility enables you to exchange text and graphics between applications. You can also submit SAS code stored in the Clipboard. The Clipboard uses DOS memory as an intermediate storage buffer for exchanging text and graphics. With the Clipboard you can move text between windows within the SAS System, and between the SAS System and other Windows applications.

Marking and Copying Text

For windows that contain text, like the EDITOR, LOG, OUTPUT, KEYS, and OPTIONS windows, you can hold down the left mouse button and drag the mouse to mark the area you want to cut or copy. The text area is immediately marked in reverse video while you are dragging the mouse. In text windows, you can scroll while you are dragging the mouse by moving the cursor beyond the border of the window in the direction you want to scroll. Release the mouse button when you have included all the text you want to copy.

To copy marked text to the Clipboard, select Copy from the Edit pop-up menu. The reverse-video area is restored to its original appearance. To paste text stored in the Clipboard, position the cursor in a text area in a window and select Paste text from the Edit pop-up menu. The text from the Clipboard is pasted to the area you indicate.

For information on marking and copying text in non-text windows (e.g., HELP, GRAPH) refer to SAS Companion for the Microsoft Windows Environment.


Next: Writing a SAS Program: the DATA Step
Up: Table of Contents
Prev: Introduction