skip to main content
OpenEdge Development: Basic Development Tools
Procedure Editor Tasks : Editing text
 
Editing text
This section describes how to edit text in the Procedure Editor. It describes the following tasks:
*Entering text
*Selecting text
*Cutting, copying, and pasting text
*Searching for text
*Inserting a file into a procedure
*Inserting a field name into a procedure
Entering text
Enter text into the Procedure Editor by typing as you would in any other editor. Text you enter into the current buffer appears at the location of the cursor. The cursor is a place marker in text. The location of the cursor is referred to as the insertion point.
You can use the keyboard arrow keys to relocate the insertion point. You also can choose SearchGoto Line to move the insertion point to a specific line number within the current buffer. See the “Search>Goto Line” section for more information on this option.
Entering special characters
There are some characters that you cannot type directly into the edit buffer. To represent ASCII control characters or other character codes that the keyboard cannot generate directly (8‑bit codes, for example), type the three‑digit octal code of the character, preceded by a tilde (~). For more information about special characters, see OpenEdge Development: ABL Reference.
When you write procedures with the Procedure Editor, you can use uppercase, lowercase, or mixed case. The ABL Compiler recognizes “table,” “TABLE,” and “Table” as the same word.
Entering long text lines
You can create and edit text lines longer than 80 characters using the Procedure Editor.
You can use a tilde (~) as the last non‑blank character on a line to indicate that the line is continued, beginning with column 1 of the next line in the window, as shown in the following example:
 
DISPLAY "This is a long message ~
continued on the next line".
The ABL Compiler interprets the lines in this example as the following single line:
 
DISPLAY "This is a long message continued on the next line".
The Procedure Editor does not change the physical presentation you give the file. When you use a tilde to connect two lines, the Procedure Editor maintains the tilde in the code. The Procedure Editor saves it and displays it; however, the Compiler compiles the file without the tilde.
Selecting text
Select text when you want to perform an action or command on that text or if you want to use the selected text in a command.
You can select text by positioning the cursor where you want to begin selecting text and pressing CTRL+V to enter block selection mode. Then move the cursor to the end of the text you want to select. The text is not highlighted, but it is selected.
Cutting, copying, and pasting text
To cut or copy text in a procedure:
1. Select the text you want to cut or copy. See the Selecting text section above for the steps to follow.
2. To cut the text, choose EditCut. To copy the text, choose EditCopy.
The Procedure Editor deletes or copies the selected range of text from the file in the current buffer and places it onto the clipboard.
To paste previously copied text into a procedure:
1. Position the cursor at the point you want to insert the text.
2. Choose EditPaste.
The Procedure Editor inserts the contents of the clipboard at the cursor and repositions the cursor after the pasted text.
Searching for text
You can search for text in the current buffer using the following menu options:
*Finding text
*Finding the next or previous occurrence of text
*Replacing text
Finding text
To search for text in the current buffer:
1. Choose SearchFind. The Find dialog box appears:
2. Enter the text string you want to find.
If you have searched for a string in the current session, the Find What field displays the text string for which you last searched. If your search is not case sensitive (that is, you do not select the Match Case option in the Find dialog box), the string you supply can be uppercase, lowercase, or both; otherwise, enter it exactly as you want to search for it.
3. Specify whether the search is case sensitive using the Match Case option.
4. Specify whether to wrap to the beginning or end of the current buffer when the search reaches the opposite end of the buffer.
5. Specify whether to search forward or backward through the current buffer by selecting the up or down options.
6. Choose OK.
The Procedure Editor searches for the first occurrence of the string in the direction you specify. When it finds a match for the search string, it positions the cursor at the end of the search string. You can choose SearchFind Next or SearchFind Previous to find the next or previous occurrence of the text. The Procedure Editor displays an alert box if it does not find a match.
Finding the next or previous occurrence of text
If you have used the SearchFind option in the current session, you can search for text using the SearchFind Next or SearchFind Previous menu options. The Procedure Editor searches for the text you specified in the Find What field of the Find dialog box in the forward direction (Find Next) or reverse direction (Find Previous).
If you have not previously used the SearchFind option in this session, OpenEdge displays an alert box when you select SearchFind Next or SearchFind Previous.
Replacing text
To search for and replace text in the current buffer:
1. Choose SearchReplace.
2. Enter the text string you want to find. The Replace dialog box appears:
If you have searched for a string in the current session, the Find What field displays the string for which you last searched. If your search is not case sensitive (that is, you do not select the Match Case option in the Replace or Find dialog box), the string you supply can be uppercase, lowercase, or both; otherwise, enter it exactly as you want to search for it. You cannot use wildcard characters when specifying the find string.
3. Enter the string with which you want to replace the specified string.
4. Specify if the search is case sensitive.
5. Choose the Replace All button if you want to replace all occurrences of the search string with the new string without confirming each occurrence.
6. Choose OK.
The Procedure Editor searches for the first occurrence of the string in a forward direction. If you do not choose the Replace All button, the Editor prompts you to confirm the replacement for each occurrence of the string it finds. If you choose the Replace All button, the Editor automatically replaces each occurrence of the string with the text in the Replace With field. When complete, the Editor displays an information alert box indicating the Replace All task is complete and displaying the number of occurrences replaced.
Inserting a file into a procedure
To insert the entire contents of a file into the text in the current buffer:
1. Place the cursor at the point where you want to insert the file.
2. Choose EditInsert File from the main menu. The Insert File dialog box appears.
3. Choose the file you want to insert, then choose OK.
The Procedure Editor inserts the file contents into the current buffer at the cursor position.
Inserting a field name into a procedure
To insert a field name into a procedure in the current buffer:
1. Place the cursor at the point where you want to insert the field name.
2. Choose EditInsert Fields from the main menu. If you are connected to a database, The Field Selector dialog box appears:
Note: If you are not already connected to a database, OpenEdge displays an alert box. If you choose OK, OpenEdge displays the Database Connect dialog box. See OpenEdge Development: Basic Database Tools for information on this dialog box. After you connect to a database, the Field Selector dialog box appears.
3. Choose the fields you want to insert.
4. Specify prefixes to include with the field names. See the “Edit>Insert Fields” section for more information on these options.
5. Choose OK. The Procedure Editor inserts the field names into the current buffer at the cursor position.