Text Editor Commands

Text editor commands
  • enable you to delete, insert, move, copy, and repeat text
  • are entered in the line number area in the Program Editor window.

The table below summarizes the basic text editing commands.


Command Action
Cn copies n lines (where n = a number up to 9999)
Dn deletes n lines
In inserts n blank lines
Mn moves n lines
Rn repeats current line n times
A after (used with C, I, and M)
B before (used with C, I, and M)


You can use text editor commands to perform actions like these:


Command Action
00001 i3002 00003 inserts 3 lines after line 00002
0ib01
00002
00003
inserts 1 line before line 00001
0ib41
00002
00003
inserts 4 lines before line 00001
000c2
00002
0a003
copies 2 lines (00001 and 00002) after line 00003
00001
0d302
00003
deletes 3 lines (00002, 00003, and 00004)
00b01
00002
00m03
moves 1 line (00003) before line 00001


In the example below, a PROC PRINT statement  and a RUN statement need to be inserted after line 00004.

Program Editor Window

To insert the PROC PRINT and RUN statements in the program,
  1. Type i2 anywhere in the line number area for line 00004 in the Program Editor window. Two blank lines are inserted, and the cursor is positioned on the first new line.
  2. Type the PROC PRINT statement on line 00005.
  3. Type a RUN statement on line 00006.

Text Editor Commands





Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement