EDIT command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc formatting)
Line 6: Line 6:
<dd>Invokes the <var class="product">Model&nbsp;204</var> full-screen editor or line editor
<dd>Invokes the <var class="product">Model&nbsp;204</var> full-screen editor or line editor
</dl>
</dl>
==Syntax==
==Syntax==
<p class="syntax">EDIT
<p class="syntax">EDIT
  [({TERMINAL [SCREEN | LINE] | SCREEN [TERMINAL]
  [({TERMINAL [SCREEN | LINE] | SCREEN [TERMINAL] | LINE [TERMINAL]})]  
| LINE [TERMINAL]})]  
  [<span class="term">procnumber1</span> [,<span class="term">procnumber2</span> | ,<span class="term">procname1</span>]
  [<i>procnumber1</i> [,<i>procnumber2</i> | ,<i>procname1</i>]
  | [<span class="term">procname1</span> [,<span class="term">procname2</span> | <span class="term">procnumber1</span>]]
  | [<i>procname1</i> [,<i>procname2</i> | <i>procnumber1</i>]]
</p>
</p>
   
   
<b>Where:</b>
Where:
<table>  
<table>  
<tr>
<tr><th>procnumber1</th>
<th>procnumber1</th>
<td>The number of an existing procedure. One of these:
<td> is the number of an existing
<ul>  
<ul>  
<li>
<li>A temporary procedure (a negative number or zero).</li>
<p>Temporary procedure (a negative number or zero).</p>
</li>
   
   
<li>
<li>A permanent procedure. If neither <i>procnumber1</i> nor <i>procname1</i> is specified, <var class="product">Model&nbsp;204</var> creates a temporary procedure (0).</li>
<p>Permanent procedure. If neither <i>procnumber1</i> nor <i>procname1</i> is specified, <var class="product">Model&nbsp;204</var> creates a temporary procedure (0).</p>
</ul>
</li>
</td></tr>
</ul>
</td>
</tr>
   
   
<tr>
<tr><th>procnumber2</th>
<th>procnumber2</th>
<td>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:
<td> is 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:
<table>
<table>
<tr class="head"><th><p>Character name </p></th>  
 
<th><p>Keyboard display</p></th> </tr>
<tr> <th>
<p>Character name </p>
</th> <th>
<p>Keyboard display</p>
</th> </tr>
    
    
<tr> <th><var>
<tr> <th><var><p>Carriage return</p></var></th>  
<p>Carriage return</p>
<td></td> </tr>
</var></th> <td></td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Comma </p></var></th>  
<p>Comma </p>
<td><p>( , ) </p></td> </tr>
</var></th> <td>
<p>( , ) </p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Equal sign </p></var></th>  
<p>Equal sign </p>
<td><p>( = )</p></td> </tr>
</var></th> <td>
<p>( = )</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Semicolon </p></var></th>  
<p>Semicolon </p>
<td><p>( ; )</p></td> </tr>
</var></th> <td>
<p>( ; )</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Single quote </p></var></th>  
<p>Single quote </p>
<td><p>( ' )</p></td> </tr>
</var></th> <td>
<p>( ' )</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Space</p></var></th>  
<p>Space</p>
<td></td> </tr>   
</var></th> <td></td> </tr>   
</table>
</table>
<p>
In addition: </p>
<ul>
<li>In version 7.6 and earlier, the procedure name cannot begin with a zero or a minus sign.</li>


In addition:
<li>As of version 7.7:
<ul>
<ul>
<li>
<li>Most of the above characters are permitted if <var>CUSTOM=42</var> is turned on. Names containing special characters must be enclosed in single quotes for all procedure commands. See [[CUSTOM parameter#Using CUSTOM=(42)|Using CUSTOM=(42)]] for details.</li>
In version 7.6 and earlier, the procedure name cannot begin with a zero or a minus sign.</li>
 
<li>
As of version 7.7:
<ul>
<li>
Most of the above characters are permitted if <var>CUSTOM=42</var> is turned on. Names containing special characters must be enclosed in single quotes for all procedure commands. See [[CUSTOM_parameter#Using_CUSTOM=(42)|Using CUSTOM=(42)]] for details.</li>
<li>The procedure name can begin with a zero.</li>
<li>The procedure name can begin with a zero.</li>
<li>Alphanumeric procedure names can begin with a minus sign character (-), which is interpreted as a dash. For example, -1myproc and -myproc are valid procedure names.</li>
<li>Alphanumeric procedure names can begin with a minus sign character (-), which is interpreted as a dash. For example, -1myproc and -myproc are valid procedure names.</li>
</li>
</ul></li>
</ul>
</li>
</ul>
</ul>
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.
<p>
</td>
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. </p></td></tr>
</tr>
</table>
</table>


===Syntax notes===
===Syntax notes===
You invoke the Full Screen Editor by entering:  
You invoke the Full Screen Editor by entering:  
<p class="syntax">EDIT (SCREEN) name  
<p class="syntax">EDIT (SCREEN) <span class="term">name</span>
</p>
</p>
<p>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:</p>
<p>
<p class="code">EDIT (LINE) name  
where <var class="term">name</var> 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:</p>
<p class="code">EDIT (LINE) <i>name</i>
</p>
</p>
<p>If neither SCREEN nor LINE is specified, <var class="product">Model&nbsp;204</var> invokes the appropriate Editor for your terminal type.</p>
<p>
If neither <var>SCREEN</var> nor <var>LINE</var> is specified, <var class="product">Model&nbsp;204</var> invokes the appropriate Editor for your terminal type.</p>


==Examples==
==Examples==
Line 111: Line 84:
EDIT -1   
EDIT -1   
</p>
</p>
==Usage notes==
==Usage notes==
<p>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.</p>
<ul>
<p>You can invoke either of the <var class="product">Model&nbsp;204</var> 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:</p>
<li>The <var>EDIT</var> command invokes either the Full Screen Editor or the Line Editor. <var>EDIT</var> 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.</li>
<p class="syntax">EDIT (TERMINAL) <span class="term">procname</span>  
 
</p>
<li>You can invoke either of the <var class="product">Model&nbsp;204</var> 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:
<p><var class="product">Model&nbsp;204</var> 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, <var class="product">Model&nbsp;204</var> reads the next line of input from the procedure containing the EDIT command. If GO is entered, <var class="product">Model&nbsp;204</var> reads the next line of input from the edited procedure, as if the EDIT command were followed by an INCLUDE command.</p>
<p class="syntax">EDIT (TERMINAL) <span class="term">procname</span></p>
<p>The TERMINAL option can be combined with either the SCREEN or LINE options. If an EDIT (SCREEN) command is issued from within a procedure, <var class="product">Model&nbsp;204</var> 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.</p>
</li>
 
<li><var class="product">Model&nbsp;204</var> 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 <var>END</var>, <var>GO</var>, or <var>QUIT</var> command. If <var>END</var> or <var>QUIT</var> is entered, <var class="product">Model&nbsp;204</var> reads the next line of input from the procedure containing the <var>EDIT</var> command. If <var>GO</var> is entered, <var class="product">Model&nbsp;204</var> reads the next line of input from the edited procedure, as if the <var>EDIT</var> command were followed by an <var>INCLUDE</var> command.</li>
 
<li>The <var>TERMINAL</var> option can be combined with the <var>SCREEN</var> or the <var>LINE</var> option. If an <var>EDIT (SCREEN)</var> command is issued from within a procedure, <var class="product">Model&nbsp;204</var> displays a message that the <var>SCREEN</var> option requires the <var>TERMINAL</var> option. If an <var>EDIT</var> command without the <var>TERMINAL</var> option is issued within a procedure, the line editor is invoked. It reads editor commands from the invoking procedure. Including the <var>TERMINAL</var> option in an <var>EDIT</var> command issued from the terminal has no effect on the operation of the <var>EDIT</var> command.</li>
 
<li>When it processes <var>EDIT</var> against a permanent procedure, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a non-backoutable update unit. For more information about <var class="product">Model&nbsp;204</var> update units, see [[File integrity and recovery]].</li>
</ul>


<p>When it processes EDIT against a permanent procedure, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a non-backoutable update unit. For more information about <var class="product">Model&nbsp;204</var> update units, see [[File integrity and recovery]].</p>
==Editor commands==
<p>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 [[:Category: Model 204 editor|Model 204 editor]] topics.</p>
<p>
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 [[:Category: Model 204 editor|Model 204 editor]] topics.</p>
<table>
<table>
<caption> Full Screen Editor commands </caption>
<caption> Full Screen Editor commands </caption>  
   
<tr class="head"><th>Command</th>  
<tr> <th>
<th>Action</th></tr>
<p>Command</p>
</th> <th>
<p>Action</p>
</th> </tr>
    
    
<tr> <th><var>
<tr> <th><var><p>[+] n</p></var></th>  
<p>[+] n</p>
<td><p>Scrolls forward n lines in a procedure.</p></td> </tr>
</var></th> <td>
<p>Scrolls forward n lines in a procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>-n</p></var></th>  
<p>-n</p>
<td><p>Scrolls backward n lines in a procedure.</p></td> </tr>
</var></th> <td>
<p>Scrolls backward n lines in a procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>=</p></var></th>  
<p>=</p>
<td><p>Repeats the command most recently executed.</p></td> </tr>
</var></th> <td>
<p>Repeats the command most recently executed.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[SET] ARBCHAR [OFF]</p></var></th>  
<p>[SET] ARBCHAR [OFF]</p>
<td><p>Sets an arbitrary (wild) character for search string.</p></td> </tr>
</var></th> <td>
<p>Sets an arbitrary (wild) character for search string.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>BACKWARD</p></var></th>  
<p>BACKWARD</p>
<td><p>Scrolls backward n screens in a procedure.</p></td> </tr>
</var></th> <td>
<p>Scrolls backward n screens in a procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>BOTTOM</p></var></th>  
<p>BOTTOM</p>
<td><p>Scrolls to last line of a procedure.</p></td> </tr>
</var></th> <td>
<p>Scrolls to last line of a procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>CLEAR</p></var></th>  
<p>CLEAR</p>
<td><p>Clears the prefix area, aborts pending prefix commands, and cancels any specified targets.</p></td> </tr>
</var></th> <td>
<p>Clears the prefix area, aborts pending prefix commands, and cancels any specified targets.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[IN filename] END [procname]</p></var></th>  
<p>[IN filename] END [procname]</p>
<td><p>Exits from the Editor and saves the edited procedure.</p></td> </tr>
</var></th> <td>
<p>Exits from the Editor and saves the edited procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>{SET] FILL {NULL | BLANK}</p></var></th>  
<p>{SET] FILL {NULL | BLANK}</p>
<td><p>Sets a fill character.</p></td> </tr>
</var></th> <td>
<p>Sets a fill character.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>FORWARD</p></var></th>  
<p>FORWARD</p>
<td><p>Scrolls forward n screens in a procedure.</p></td> </tr>
</var></th> <td>
<p>Scrolls forward n screens in a procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[IN filename] GET procname</p></var></th>  
<p>[IN filename] GET procname</p>
<td><p>Inserts a saved procedure in the procedure being edited.</p>
</var></th> <td>
<p>Inserts a saved procedure in the procedure being edited.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[IN filename] GO [procname]</p></var></th>  
<p>[IN filename] GO [procname]</p>
<td><p>Exits from the Full Screen Editor, saves the edited procedure, and includes the procedure.</p></td> </tr>
</var></th> <td>
<p>Exits from the Full Screen Editor, saves the edited procedure, and includes the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[SET] LINEND {OFF | char}</p></var></th>  
<p>[SET] LINEND {OFF | char}</p>
<td><p>Sets the line-end character.</p></td> </tr>
</var></th> <td>
<p>Sets the line-end character.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[-] LOCATE /string  [[IN] RANGE]</p></var></th>  
<p>[-] LOCATE /string  [[IN] RANGE]</p>
<td><p>Locates the specified string in a procedure</p></td> </tr>
</var></th> <td>
<p>Locates the specified string in a procedure</p>
</td> </tr>
    
    
<tr> <th><var>
<tr> <th><var><p>[SET] PREFIX {RIGHT | LEFT}</p></var></th>  
<p>[SET] PREFIX {RIGHT | LEFT}</p>
<td><p>Controls the position of the prefix area on the screen.</p>
</var></th> <td>
<p>Controls the position of the prefix area on the screen.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>QUIT [QUIT] </p></var></th>  
<p>QUIT [QUIT] </p>
<td><p>Exits from the Editor; does not save the edited procedure.</p>
</var></th> <td>
<p>Exits from the Editor; does not save the edited procedure.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[SET] REPEAT {OFF | char}</p></var></th>  
<p>[SET] REPEAT {OFF | char}</p>
<td><p>Sets the repeat character for search strings.</p></td> </tr>
</var></th> <td>
<p>Sets the repeat character for search strings.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>REPLACE /string1/string2/ [n |*] [VERIFY] [[IN] RANGE]</p></var></th>  
<p>REPLACE /string1/string2/ [n |*] [VERIFY] [[IN] RANGE]</p>
<td><p>Locates and replaces the specified string in a procedure.</p>
</var></th> <td>
<p>Locates and replaces the specified string in a procedure.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[IN filename] SAVE </p><p> [procname] [[IN] RANGE] </p>
<p>[IN filename] SAVE </p>
</var></th>  
<p> [procname] [[IN] RANGE] </p>
<td><p>Saves the edited procedure. </p></td> </tr>
</var></th> <td>
<p>Saves the edited procedure. </p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[SET] SCA;E {OFF | ON}</p></var></th>  
<p>[SET] SCA;E {OFF | ON}</p>
<td><p>Controls the display of the column scale on the screen.</p>
</var></th> <td>
<p>Controls the display of the column scale on the screen.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>TOP</p></var></th>  
<p>TOP</p>
<td><p>Scrolls to the first line of a procedure. </p></td> </tr>
</var></th> <td>
<p>Scrolls to the first line of a procedure. </p>
</td> </tr>
 
</table>
</table>
<p>The table below lists the Line Editor commands. </p>
 
<p>
The table below lists the Line Editor commands. </p>
<table>
<table>
<caption>Line Editor commands</caption>
<caption>Line Editor commands</caption>  
   
<tr class="head"><th><p>Command</p></th>  
<tr> <th>
<th><p>Action</p></th> </tr>
<p>Command</p>
</th> <th>
<p>Action</p>
</th> </tr>
    
    
<tr> <th><var>
<tr> <th><var><p>[n] (commands)</p></var></th>  
<p>[n] (commands)</p>
<td><p>Repeats a series of commands n times.</p></td> </tr>
</var></th> <td>
<p>Repeats a series of commands n times.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] C</p></var></th>  
<p>[n] C</p>
<td><p>Moves the pointer n characters right or left in the procedure.</p>
</var></th> <td>
<p>Moves the pointer n characters right or left in the procedure.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] D</p></var></th>  
<p>[n] D</p>
<td><p>Deletes n characters in the procedure.</p></td> </tr>
</var></th> <td>
<p>Deletes n characters in the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[procname] END</p></var></th>  
<p>[procname] END</p>
<td><p>Exits from the Line Editor and saves the edited procedure.</p>
</var></th> <td>
<p>Exits from the Line Editor and saves the edited procedure.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[procname] GO</p></var></th>  
<p>[procname] GO</p>
<td><p>Exits from the Line Editor, saves the edited procedure, and includes the procedure.</p></td> </tr>
</var></th> <td>
<p>Exits from the Line Editor, saves the edited procedure, and includes the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[procname] I</p></var></th>  
<p>[procname] I</p>
<td><p>Combines procedures.</p></td> </tr>
</var></th> <td>
<p>Combines procedures.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>I/string/</p></var></th>  
<p>I/string/</p>
<td><p>Inserts a string before the current pointer.</p></td> </tr>
</var></th> <td>
<p>Inserts a string before the current pointer.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] J</p></var></th>  
<p>[n] J</p>
<td><p>Initializes the pointer at the first character in a procedure or moves it forward or backward n lines.</p></td> </tr>
</var></th> <td>
<p>Initializes the pointer at the first character in a procedure or moves it forward or backward n lines.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] [H] K</p></var></th>  
<p>[n] [H] K</p>
<td><p>Deletes n lines from the procedure.</p></td> </tr>
</var></th> <td>
<p>Deletes n lines from the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] L</p></var></th>  
<p>[n] L</p>
<td><p>Moves pointer n lines forward or backward in the procedure.</p>
</var></th> <td>
<p>Moves pointer n lines forward or backward in the procedure.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th nowrap><var><p>[n] R/string1/string2/</p></var></th>  
<p>[n] R/string1/</p>
<td><p>Replaces a specified string in the procedure.</p></td> </tr>
<p>      string2/</p>
</var></th> <td>
<p>Replaces a specified string in the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] S/string/</p></var></th>  
<p>[n] S/string/</p>
<td><p>Searches for an occurrence of a specified string in the procedure.</p></td> </tr>
</var></th> <td>
<p>Searches for an occurrence of a specified string in the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>[n] [H] T</p></var></th>  
<p>[n] [H] T</p>
<td><p>Displays a portion of the procedure being edited.</p></td> </tr>
</var></th> <td>
<p>Displays a portion of the procedure being edited.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Xline</p></var></th>  
<p>Xline</p>
<td><p>Replaces a line in the procedure.</p></td> </tr>
</var></th> <td>
<p>Replaces a line in the procedure.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Yline</p></var></th>  
<p>Yline</p>
<td><p>Inserts a line before the line at which the pointer is positioned.</p></td> </tr>
</var></th> <td>
<p>Inserts a line before the line at which the pointer is positioned.</p>
</td> </tr>
   
   
<tr> <th><var>
<tr> <th><var><p>Z</p></var></th>  
<p>Z</p>
<td><p>Positions the pointer after the last character in the procedure. </p></td> </tr>  
</var></th> <td>
<p>Positions the pointer after the last character in the procedure.   </p>
</td> </tr>
 
</table>
</table>
[[Category: General user commands]]
[[Category: General user commands]]
[[Category:Commands]]
[[Category:Commands]]

Revision as of 20:54, 6 July 2016

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:
  • A temporary procedure (a negative number or zero).
  • A permanent procedure. If neither procnumber1 nor procname1 is specified, Model 204 creates a temporary procedure (0).
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:

Character name

Keyboard display

Carriage return

Comma

( , )

Equal sign

( = )

Semicolon

( ; )

Single quote

( ' )

Space

In addition:

  • In version 7.6 and earlier, the procedure name cannot begin with a zero or a minus sign.
  • As of version 7.7:
    • Most of the above characters are permitted if CUSTOM=42 is turned on. Names containing special characters must be enclosed in single quotes for all procedure commands. See Using CUSTOM=(42) for details.
    • The procedure name can begin with a zero.
    • Alphanumeric procedure names can begin with a minus sign character (-), which is interpreted as a dash. For example, -1myproc and -myproc are valid procedure names.

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.

Full Screen Editor commands
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.

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.