EDIT command
Summary
- Privileges
- Any user
- Function
- Invokes the Model 204 full-screen editor or line editor
Syntax
EDIT [({TERMINAL [SCREEN | LINE] | SCREEN [TERMINAL] | LINE [TERMINAL]})] [procnumber1 [,procnumber2 | ,procname1] | [procname1 [,procname2 | procnumber1]]
Where:
procnumber1 | The number of an existing procedure. One of these:
| ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
procnumber2 | The number of a new temporary procedure (a negative number or zero). procname2 is the name of a new procedure (1 to 255 characters); the name can contain any letters, numbers, or symbols except:
In addition:
Rocket Software recommends that you limit the length of your procedure name to less than 210 bytes. Although a name in excess of 210 bytes is not incorrect and will not cause compile errors, it could be truncated by MSGCTL processing. |
Syntax notes
You invoke the Full Screen Editor by entering:
EDIT (SCREEN) name
where name identifies the procedure to be edited. If this is entered from a line-at-a-time terminal, however, an error message is issued stating that a full-screen terminal is required. You invoke the Line Editor by entering:
EDIT (LINE) name
If neither SCREEN nor LINE is specified, Model 204 invokes the appropriate Editor for your terminal type.
Examples
EDIT EDIT (SCREEN) PROC1 EDIT XUPDTE EDIT -1
Usage notes
- The EDIT command invokes either the Full Screen Editor or the Line Editor. EDIT can optionally specify the name or number of an existing procedure to be edited, and can specify a new name or number for the edited procedure. Specifying 0 or a negative number edits a temporary procedure. If no name or number is supplied, temporary procedure 0 is assumed.
- You can invoke either of the Model 204 Editors from within a procedure and have the Editor go directly to your terminal for input. Entering the following command directs an editing session to your terminal:
EDIT (TERMINAL) procname
- Model 204 selects either the Full Screen Editor or the Line Editor for the user running the procedure. The Editor reads input from the terminal until you end the session with an END, GO, or QUIT command. If END or QUIT is entered, Model 204 reads the next line of input from the procedure containing the EDIT command. If GO is entered, Model 204 reads the next line of input from the edited procedure, as if the EDIT command were followed by an INCLUDE command.
- The TERMINAL option can be combined with the SCREEN or the LINE option. If an EDIT (SCREEN) command is issued from within a procedure, Model 204 displays a message that the SCREEN option requires the TERMINAL option. If an EDIT command without the TERMINAL option is issued within a procedure, the line editor is invoked. It reads editor commands from the invoking procedure. Including the TERMINAL option in an EDIT command issued from the terminal has no effect on the operation of the EDIT command.
- When it processes EDIT against a permanent procedure, Model 204 ends any update unit in progress and begins a non-backoutable update unit. For more information about Model 204 update units, see File integrity and recovery.
Editor commands
The following tables summarize the available full-screen editor and line editor commands. In all commands that refer to procedure name (procname), a procedure number can be specified to refer to a temporary procedure. For more information, see the Model 204 editor topics.
Command | Action |
---|---|
[+] n |
Scrolls forward n lines in a procedure. |
-n |
Scrolls backward n lines in a procedure. |
= |
Repeats the command most recently executed. |
[SET] ARBCHAR [OFF] |
Sets an arbitrary (wild) character for search string. |
BACKWARD |
Scrolls backward n screens in a procedure. |
BOTTOM |
Scrolls to last line of a procedure. |
CLEAR |
Clears the prefix area, aborts pending prefix commands, and cancels any specified targets. |
[IN filename] END [procname] |
Exits from the Editor and saves the edited procedure. |
{SET] FILL {NULL | BLANK} |
Sets a fill character. |
FORWARD |
Scrolls forward n screens in a procedure. |
[IN filename] GET procname |
Inserts a saved procedure in the procedure being edited. |
[IN filename] GO [procname] |
Exits from the Full Screen Editor, saves the edited procedure, and includes the procedure. |
[SET] LINEND {OFF | char} |
Sets the line-end character. |
[-] LOCATE /string [[IN] RANGE] |
Locates the specified string in a procedure |
[SET] PREFIX {RIGHT | LEFT} |
Controls the position of the prefix area on the screen. |
QUIT [QUIT] |
Exits from the Editor; does not save the edited procedure. |
[SET] REPEAT {OFF | char} |
Sets the repeat character for search strings. |
REPLACE /string1/string2/ [n |*] [VERIFY] [[IN] RANGE] |
Locates and replaces the specified string in a procedure. |
[IN filename] SAVE [procname] [[IN] RANGE] |
Saves the edited procedure. |
[SET] SCA;E {OFF | ON} |
Controls the display of the column scale on the screen. |
TOP |
Scrolls to the first line of a procedure. |
The table below lists the Line Editor commands.
Command |
Action |
---|---|
[n] (commands) |
Repeats a series of commands n times. |
[n] C |
Moves the pointer n characters right or left in the procedure. |
[n] D |
Deletes n characters in the procedure. |
[procname] END |
Exits from the Line Editor and saves the edited procedure. |
[procname] GO |
Exits from the Line Editor, saves the edited procedure, and includes the procedure. |
[procname] I |
Combines procedures. |
I/string/ |
Inserts a string before the current pointer. |
[n] J |
Initializes the pointer at the first character in a procedure or moves it forward or backward n lines. |
[n] [H] K |
Deletes n lines from the procedure. |
[n] L |
Moves pointer n lines forward or backward in the procedure. |
[n] R/string1/string2/ |
Replaces a specified string in the procedure. |
[n] S/string/ |
Searches for an occurrence of a specified string in the procedure. |
[n] [H] T |
Displays a portion of the procedure being edited. |
Xline |
Replaces a line in the procedure. |
Yline |
Inserts a line before the line at which the pointer is positioned. |
Z |
Positions the pointer after the last character in the procedure. |