Tips+on+using+the+ISPF+editor

=**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.

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.
 * __Inserting Lines__**

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.
 * __Power Typing__**

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.
 * __Deleting 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.
 * __Replicating Lines__**

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.
 * __Copy/Moving Command__**

a00004** Paste the copy text after this line.
 * c20001** Begin copy command
 * 000002** The end of copy command
 * 000003
 * 000005**

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

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.
 * __Block Editing__**

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 ****.
 * Deleting blocks**


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

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 **** and **** 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 ****.
 * Moving Blocks**


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

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

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

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 ****.
 * __Splitting Lines__**

__Changing Data__ The **CHANGE** primary command lets you change a specified character string to another string. An example is:

If there is anything other than letters or numbers, put them in double quotes.
 * CHANGE //string-1// //string-2//**
 * 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: code 000031 THAT WILL BE 000032  CONVERTED TO 000033  LOWERCASE AFTER 000034 YOU PRESS . 000035 000036 code 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. code 000031 THAT WILL BE 000032  CONVERTED TO 000033  LOWERCASE AFTER 000035 000036 code To convert from lower case to upper case, you type the command //uc// and a number over the line number, like so: code 000031 that will be 000032  converted to 000033  uppercase after 000034 you press. 000035 000036 code Similar to converting to lower case, converting to uppercase you use the command ucuc, to do it in bulk. code 000031 that will be 000032  converted to 000033  uppercase after 000035 000036 code
 * lc5**030 THIS STARTS 5 LINES
 * lclc**30 THIS IS TEXT
 * lclc**34 YOU PRESS .
 * uc5**030 this starts 5 lines
 * ucuc**30 this is text
 * ucuc**34 you press.

Useful Sources: http://docweb.cns.ufl.edu/docs/d0089/d0089.html#id2946399 http://www.felgall.com/tso5.htm http://www.okstate.edu/cis_info/cis_manual/tso_edit.html