wnextedit
or wpgm
in
the command bar.
Actions
|
Instructions
|
---|---|
Open a new file
|
Do one of the following:
|
Open an existing file
by using the Open dialog box
|
Open the dialog box
by using one of the following:
Select the file.
Click Open.
Note: You can also open an existing
file by using the Most Recently Used File List.
You can set the Recently Used File List option by accessing ToolsOptionsPreferencesGeneral Tab. When you set this
option, files that are created or opened are listed at the bottom
of the File menu.
|
Open multiple individual
files by using the dialog box
|
|
Open an existing file,
bypassing the Open dialog box
|
Do one of the following:
|
Open multiple views
of an opened file
|
When you open multiple
views of a file, changes that you make in any view of the file are
made simultaneously in all views.
|
Append a file to an
opened file
|
|
* The Enhanced Editor must be the active window.
|
Autosave
of filename.$AS
, where filename is the name of the file. Under Windows, the pathname for the Application Data folder is c:\Users\
user-ID\AppData\Roaming
.
For example, the path to the autosave file for MYPROGRAM.SAS in folder
C:\TEMP would be C:\Users\my-user-ID\AppData\Roaming\SAS\EnhancedEditor\
Autosave of myprogram.$AS
Command
|
Description
|
---|---|
UP
|
Move one page toward
the beginning of the file.
|
DOWN
|
Move one page toward
the end of the file.
|
LEFT
|
Move one page to the
left.
|
RIGHT
|
Move one page to the
right.
|
nums
in the command bar.
To suppress line numbers, either deselect Show line numbers or
type nums
again in the command bar.
Command
|
Description
|
Default Value of n
|
Maximum Value Allowed
|
Example
|
---|---|---|---|---|
:In
|
Insert n lines
after the current line.
|
1
|
9999
|
:I4
Inserts 4 lines after
the current line
|
:IAn
|
Insert n lines
after the current line.
|
1
|
9999
|
:IA4
Inserts 4 lines after
the current line
|
:IBn
|
Insert n lines
before the current line.
|
1
|
9999
|
:IB2
Inserts 2 lines before
the current line
|
:Dn
|
Delete n lines
starting at the current line.
|
1
|
9999
|
:D3
Deletes three lines,
starting with the current line.
|
:Rn
m |
Repeat the block of m lines,
starting with the current line, n times.
A space is required between n and m.
|
1
|
9999
|
:R1 6
Repeats six lines, starting
with the current line, one time.
|
Use this key sequence...
|
To move the insertion
point....
|
---|---|
Up arrow
|
up one line
|
Down arrow
|
down one line
|
Left arrow
|
left by one character
|
Right arrow
|
right by one character
|
Page Down
|
down a page
|
Page Up
|
up a page
|
Home
|
to the beginning of
the current line
|
Ctrl + Home or
Ctrl + Page Up
|
to the beginning of
the document
|
End
|
to the end of the current
line
|
Ctrl + End or
Ctrl + Page Down
|
to the end of the document
|
Ctrl + up arrow
|
toward the top of the
file while scrolling up
|
Ctrl + down arrow
|
toward the bottom of
the file while scrolling down
|
Ctrl + right arrow
|
to the start of the
next word
|
Ctrl + left arrow
|
to the start of the
previous word
|
Ctrl + ]
|
to the matching parenthesis
or bracket
|
Ctrl + G
|
to a specific line number
|
Alt + up arrow
|
to the first visible
line
|
Alt + down arrow
|
to the last visible
line
|
Alt + right arrow
|
to the next case change
or word boundary
|
Alt + left arrow
|
to the previous case
change or word boundary
|
Shift + Tab
|
backward to the previous
tab stop
|
Text Selection
|
Instructions
|
---|---|
One or more lines of
text using the margin
|
|
Single or multiple characters,
or whole lines of text
|
|
To...
|
Instructions
|
---|---|
Extend a selection in
a particular direction
|
Press the Shift key
and then press a directional arrow.
|
Extend a selection one
character at a time
|
Press Shift + left arrow
or right arrow
|
Unmark selected text
|
Press any directional
key
|
Copy selected text
|
Press Ctrl + C or select EditCopy
|
Cut selected text
|
Press Ctrl + X or select EditCut
|
Paste from the clipboard
|
Press Ctrl + V or select EditPaste
|
Move selected text
|
|
To highlight a column
of code or data
|
Press the Alt key +
the left mouse button. Drag to select.
|
Code Error Type
|
Instructions
|
---|---|
Undefined keywords
|
Select ToolsOptionsEnhanced editor Appearance
tab in order to set the file elements Defined
keyword, User-defined
keyword, and the Undefined keyword to
unique color combinations.
When SAS recognizes
a keyword, the keyword changes to the defined colors. You can easily
spot undefined keywords by looking for the colors that you selected
for undefined keywords.
|
Unmatched quoted strings
|
Look for one or more
lines of the program that are the same color.
Text following a quotation mark remains the same color until the string is closed
with a matching quotation mark.
|
Unmatched comments
|
Look for one or more
lines of the program that are the same color.
Text that follows an
open comment symbol ( /* ) remains the same color until the comment
is closed with a closing comment symbol ( */).
|
Matching DO-END pairs
|
Place the cursor within
a DO-END block and press Alt + [.
The cursor moves first
to the DO keyword. If one of the keywords is not found, the cursor
remains as positioned.
When both of the keywords
exist, pressing Alt + [ moves the cursor between the DO-END keywords.
|
Matching parentheses
or brackets
|
Place the cursor on
either side of the parenthesis or bracket. Press Ctrl + ].
The cursor moves to
the matching parentheses or bracket. If one is not found, the cursor
remains as positioned.
|
Missing semi-colons
( ; )
|
Look for keywords that
appear in normal text.
|
Action
|
Keyboard Shortcuts
|
---|---|
Bookmark a line
|
Ctrl + F2 on an unmarked
line
|
Unmark a line
|
Ctrl + F2 on a marked
line
|
Go to the next bookmark
|
F2
|
Go to the previous bookmark
|
Shift + F2
|
Submitting a Complete
Program
|
Instructions
|
---|---|
When you open the program
in the editor
|
Select the Submit check
box.
|
From the Enhanced Editor
|
Do one of the following:
|
Submitting Partial Programs
|
Instructions
|
---|---|
Only the top line of
a program
|
Do one of the following:
|
A specified number of
lines, beginning with the first line
|
|
data oranges; input variety $ flavor texture looks; total=flavor+texture+looks; datalines; navel 9 8 6 temple 7 7 7 valencias 8 9 9 mandarins 5 7 9 ; proc sort data=oranges; by descending total; run; proc print data=oranges; title 'Taste Test Results for Oranges using File ' %sysget(SAS_EXECFILENAME); footnote 'The full path is ' %sysget(SAS_EXECFILEPATH); run;
%sysfunc(getoption(SYSIN))
. The following macro can be used to obtain the full path in both a batch session
and an interactive session by using the Enhanced Editor: %let execpath=" "; %macro setexecpath; %let execpath=%sysfunc(GetOption(SYSIN)); %if %length(&execpath)=0 %then %let execpath=%sysget(SAS_EXECFILEPATH); %mend setexecpath; %setexecpath; %put &execpath;
%put Submitted file path is %sysget(SAS_EXECFILEPATH).; %put Submitted file name is %sysget(SAS_EXECFILENAME).;
Keyboard Shortcut
|
Task
|
---|---|
Get help for a SAS procedure
|
Press the mouse button
and place the insertion point within the procedure name and press
F1
|
Add a new abbreviation
|
Ctrl + Shift + A
|
Toggle expand current
line
|
Alt + Num *
|
Collapse all code sections
|
Alt + Ctrl + Number
pad -
|
Expand all code sections
|
Alt + Ctrl + Number
pad +
|
Toggle marker on the
current line
|
Ctrl + F2
|
Go to the next marked
line
|
F2
|
Go to the previous marked
line
|
Shift + F2
|
Go to line
|
Ctrl + G
|
Go to the beginning
of the file
|
Ctrl + Page Up
|
Go to the end of the
file
|
Ctrl + Page Down
|
Convert selected text
to uppercase
|
Ctrl + Shift + U
|
Convert selected text
to lowercase
|
Ctrl + Shift + L
|
rsubmit;
endrsubmit;
Insert carriage return Insert character ['r'] Insert character ['s'] Insert character ['u'] Insert character ['b'] Insert character ['m'] Insert character ['i'] Insert character ['t'] Insert character [';'] Insert carriage return Insert carriage return Insert character ['e'] Insert character ['n'] Insert character ['d'] Insert character ['r'] Insert character ['s'] Insert character ['u'] Insert character ['b'] Insert character ['m'] Insert character ['i'] Insert character ['t'] Insert character [';'] Move cursor up Insert character ['|']
File Type
|
Default File Extension
|
---|---|
SAS Program File
|
.sas
|
SCL Program File
|
.scl
|
HTML Document
|
.htm, .html, .xml
|