Basic line commands

Line editing commands in ISPF Editor are entered at the line number in the file and executed by pressing < ENTER>. The line command field is the column of line numbers on the left of your screen. These will affect only a single line or block of lines.

Inserting Lines
Type in (n is number), the system will insert n blank lines after the line on which you enter the in command. If only i is entered with no number after it, the system will go into "Insert mode." The insert mode means each time you press the enter key after typing, you will get a new blank line. To get out of insert mode, press enter key twice.

Power Typing
When you have many lines to enter, the command TE can help you enter your information in a long line. Before using TE command, make sure the caps mode is off, so that your text will not be translated to uppercase ( To turn off the caps mode, enter CAPS OFF on the command line ). Also enter NUMBER OFF on the command line, so that the sequence numbers will not be written over any of your text.

Deleting Lines
Enter Dn to delete n number of lines. The deletes line start from the line on which you entered the D command. To delete only one line just use the command D without numbers.

Replicating Lines
Enter Rn to replicate a line with n times. The new replicate lines are created after the line where you type in the Rn command.

Copy/Moving Command
The Copy and move command are Cn and Mn. N is the numbers of line you want to copy or move from the line on which you enter the command. Command A or B is paste or move the text after or before the line on which you enter the command.

c20001 Begin copy command
000002 The end of copy command
Paste the copy text after this line.

The text (line 4 and 5) will be added before this line.
m20004 Begin move command
000005 The end of move command

Block Editing
Block editing enables you to delete, copy, or move a large number of lines without having to specify an exact number. Also, you can start an operation on one screen and complete it after paging to another screen.

Deleting blocks
Block off the area you would like to delete by typing the command DD next to the beginning and ending lines of your block and press <Enter>.

dd0010 This will delete the entire
000011 block including the ones
dd0012 containing the DD commands (10-12)

Moving Blocks
First, type MM on the beginning and ending lines you would like to move. Second, move the cursor to the line where the block is to be moved (you can use <F8> and <F7> to move through your data set). Lastly, you can either type an A to move the block after the selected line, or type B to move the block before the line and press <Enter>.

mm0020 This is the first line
000021 that will be moved.
000022 This is the last line
mm0023 that will be moved.
a00025 Block will be moved to after this line.

Copying Blocks
This is done the same way as moving a block of lines (see above) but instead uses the cc command.

cc0020 This is the first line
000021 that will be copied.
000022 This is the last line
cc0023 that will be copied.
Block will be copied to before this line.

Splitting Lines
The ts line command splits a line into two lines. Type TSn (n=how many blank lines to insert between the split lines) in the line command field and move your cursor to the location in the line where you want to split it and press <Enter>.

Changing Data
The CHANGE primary command lets you change a specified character string to another string. An example is:

CHANGE string-1 string-2
If there is anything other than letters or numbers, put them in double quotes.
CHANGE abc def CHANGE "isn't" "aren't"

Converting Characters to Lower Case
You use the LC command, typing over the line number. For example, if you want to change 5 lines from uppercase to lower case, you type lc5 over the line number, like so:
**lc5**030  THIS STARTS 5 LINES
000031  THAT WILL BE
000034  YOU PRESS <ENTER>.
If you want to change a block of lines from upper case to lower case, type lclc on the first and last line that you want changed.
**lclc**30  THIS IS TEXT
000031  THAT WILL BE
**lclc**34  YOU PRESS <ENTER>.
To convert from lower case to upper case, you type the command uc and a number over the line number, like so:
**uc5**030  this starts 5 lines
000031  that will be
000032  converted to
000033  uppercase after
000034  you press <enter>.
Similar to converting to lower case, converting to uppercase you use the command ucuc, to do it in bulk.
**ucuc**30  this is text
000031  that will be
000032  converted to
000033  uppercase after
**ucuc**34  you press <enter>.

Useful Sources: