Model 204 full-screen editor: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (misc cleanup)
Line 620: Line 620:
===Repeat character===
===Repeat character===
<p>
<p>
  The repeat character indicates that the previous character in the string can be repeated any number of times. For example, your repeat character is an exclamation point (!) and you specify the following search string:</p>
  The repeat character indicates that the previous character in the string can be repeated any number of times. For example, your repeat character is an exclamation point (<tt>!</tt>), and you specify the following search string:</p>
<p class="code">Format *!</p>
<p class="code">Format *!</p>
<p>Any of the following strings in the procedure are located:</p>
<p>
Any of the following strings in the procedure are located:</p>
<p class="code">Format *
<p class="code">Format *
Format **
Format **
Line 628: Line 629:
   
   
====Setting the repeat character (REPEAT)====
====Setting the repeat character (REPEAT)====
<p>The REPEAT command specifies a repeat character that matches zero or more occurrences of the repeating character when it is included in a search string.</p>
<p>
<p>The format of the REPEAT command is as follows:</p>
The REPEAT command specifies a repeat character that matches zero or more occurrences of the repeating character when it is included in a search string.</p>  
   
   
====Syntax====
====Syntax====
<p class="code">[SET] REPEAT {<u>OFF</u> | <var class="term">char</var>}</p>
<p>
<p>where: <var class="term">char</var> represents the repeat character.</p>
The format of the REPEAT command is as follows:</p>
<p>REPEAT OFF is the default.</p>
<p class="syntax">[SET] REPEAT {<u>OFF</u> | <span class="term">char</span>}</p>
<p>Suppose that you specify:</p>
<p>
Where <var class="term">char</var> represents the repeat character.</p>
<p>
REPEAT OFF is the default.</p>
<p>
Suppose that you specify:</p>
<p class="code">REPEAT &amp;</p>
<p class="code">REPEAT &amp;</p>
<p>Then you use the &amp; in the LOCATE command:</p>
<p>
Then you use the &amp; in the LOCATE command:</p>
<p class="code">LOCATE /MODEL*&amp;</p>
<p class="code">LOCATE /MODEL*&amp;</p>
<p>The full-screen editor searches for strings that contain the characters MODEL, followed by any number of asterisks. The following strings are selected:</p>
<p>
The full-screen editor searches for strings that contain the characters <code>M O D E L</code>, followed by any number of asterisks. The following strings are selected:</p>
<p class="code">MODEL*
<p class="code">MODEL*
MODEL***
MODEL***
MODEL**</p>
MODEL**</p>
<p>The following strings are not selected:</p>
<p>
The following strings are <b><i>not</i></b> selected:</p>
<p class="code">MODEL1
<p class="code">MODEL1
MOD***
MOD***
MODEL *</p>
MODEL *</p>
<p>You can use repeat characters in conjunction with wildcard characters. For example, suppose that the wildcard character is an exclamation point (!) and the repeat character is and ampersand (&amp;) and you specify the following search string:</p>
<p>
You can use repeat characters in conjunction with wildcard characters. For example, suppose that the wildcard character is an exclamation point (<tt>!</tt>), the repeat character is an ampersand (<tt>&amp;</tt>), and you specify the following search string:</p>
<p class="code">/PRE!&amp;</p>
<p class="code">/PRE!&amp;</p>
<p>The full-screen editor locates any string that begins with the letters PRE, followed by any number of any other characters.</p>
<p>
<p>To turn off the repeat character capability, enter:</p>
The full-screen editor locates any string that begins with the letters <code>P R E</code>, followed by any number of any other characters.</p>
<p>
To turn off the repeat character capability, enter:</p>
<p class="code">REPEAT OFF</p>
<p class="code">REPEAT OFF</p>
<p>If you enter REPEAT OFF, none of the characters in the specified search strings in subsequent LOCATE or REPLACE commands are considered repeat characters.</p>
<p>
If you enter <code>REPEAT OFF</code>, none of the characters in the specified search strings in subsequent <var>LOCATE</var> or <var>REPLACE</var> commands are considered repeat characters.</p>


===End-of-line character===
===End-of-line character===
<p>
<p>
The end-of-line character indicates the end of one line and the beginning of the next line. When the end-of-line character is used in a search string, it specifies a search for a string that occurs at the beginning or end of a line. For example, the percent sign (%) is your end-of-line character and you specify the following search string:</p>
The end-of-line character indicates the end of one line and the beginning of the next line. When the end-of-line character is used in a search string, it specifies a search for a string that occurs at the beginning or end of a line. For example, the percent sign (<tt>%</tt>) is your end-of-line character, and you specify the following search string:</p>
<p class="code">%prefix</p>
<p class="code">%prefix</p>
<p>Any line beginning with the word prefix is located:</p>
<p>
Any line beginning with the word <code>prefix</code> is located:</p>
<p class="code">prefix area!!!
<p class="code">prefix area!!!
prefixes!!!
prefixes!!!
prefix 12!!!</p>
prefix 12!!!</p>
<p>The percent sign (%) is your end-of-line character and you specify the following search string:</p>
<p>
The percent sign (<tt>%</tt>) is your end-of-line character, and you specify the following search string:</p>
<p class="code">prefix%</p>
<p class="code">prefix%</p>
<p>Any line ending with the word prefix is located.</p>
<p>
<p>Specify an end-of-line character only at the beginning or at the end of the search string.</p>
Any line ending with the word <code>prefix</code> is located.</p>
<p>
Specify an end-of-line character only at the beginning or at the end of the search string.</p>
   
   
====Setting the end-of-line character====
====Setting the end-of-line character====
<p>The LINEND command specifies an end-of-line character. When you use an end-of-line character in a search string, it represents a character that indicates the end of one line and the beginning of the next line. The editor searches for a string that occurs at the beginning or end of a line.</p>
<p>
<p>The format of the LINEND command is as follows:</p>
The <var>LINEND</var> command specifies an end-of-line character. When you use an end-of-line character in a search string, it represents a character that indicates the end of one line and the beginning of the next line. The editor searches for a string that occurs at the beginning or end of a line.</p>
 
====Syntax====
====Syntax====
<p class="code">[SET] LINEND {<u>OFF</u> | <var class="term">char</var>}</p>
<p>
<p>where:</p>
The format of the <var>LINEND</var> command is as follows:</p>
<var class="term">char</var> represents the end-of-line character.
 
<p>LINEND OFF is the default.</p>
<p class="syntax">[SET] LINEND {<u>OFF</u> | <span class="term">char</span>}</p>
<p> Suppose that you specify:</p>
<p>
Where <var class="term">char</var> represents the end-of-line character.</p>
<p>
<code>LINEND OFF</code> is the default.</p>
<p>
Suppose that you specify:</p>
<p class="code">LINEND #</p>
<p class="code">LINEND #</p>
<p>Then you use the pound sign (#) in a search string:</p>
<p>
Then you use the pound sign (<tt>#</tt>) in a search string:</p>
<p class="code">LOCATE /#PART</p>
<p class="code">LOCATE /#PART</p>
<p>The full-screen editor locates any line that begins with the letters PART.</p>
<p>
<p>You must specify the end-of-line character at the start or end of a search string.</p>
The full-screen editor locates any line that begins with the letters <code>P A R T</code>.</p>
<p>To turn off the end-of-line character capability, enter:</p>
<p>
You must specify the end-of-line character at the start or end of a search string.</p>
<p>
To turn off the end-of-line character capability, enter:</p>
<p class="code">LINEND OFF</p>
<p class="code">LINEND OFF</p>
<p>If you enter LINEND OFF, none of the characters in the search strings specified in subsequent LOCATE or REPLACE commands are considered end-of-line characters.</p>
<p>
If you enter <code>LINEND OFF</code>, none of the characters in the search strings specified in subsequent <var>LOCATE</var> or <var>REPLACE</var> commands are considered end-of-line characters.</p>


===Combining special search characters===
===Combining special search characters===
<p>
<p>
You can specify combinations of characters in the search string. For example, the following search string locates any string that contains HELP, followed by any number of characters, followed by ME:</p>
You can specify combinations of characters in the search string. For example, the following search string locates any string that contains HELP, followed by any number of characters, followed by ME:</p>
<p class="code">HELP&amp;!ME</p>
<p class="code">HELP&amp;!ME</p>
<p>
<p>
For example:</p>
For example:</p>
<p class="code">HELP123ABME
<p class="code">HELP123ABME
HELP ME</p>
HELP ME</p>
Line 697: Line 724:
==Searching for a string (LOCATE)==
==Searching for a string (LOCATE)==
<p>
<p>
The LOCATE command searches for a particular string in the procedure or in a subset of the procedure. See [[#Specifying a string|Specifying a string]] for more information about string specifications.</p>
The <var>LOCATE</var> command searches for a particular string in the procedure or in a subset of the procedure. See [[#Specifying a string|Specifying a string]] for more information about string specifications.</p>
   
   
===Two formats of the LOCATE command===
===Two formats of the LOCATE command===
<p>
<p>
There are two formats of the LOCATE command.</p>
There are two formats of the <var>LOCATE</var> command.</p>
   
   
====With LOCATE keyword====
====With LOCATE keyword====
<p>The first format is as follows:</p>
<p>
 
The first format is as follows:</p>
====Syntax====
<p class="syntax">[-][<b>LO</b>CATE] /<span class="term">string</span>[/ [IN]<span class="term">range</span>]</p>
<p class="code">[-][<b>LO</b>CATE] /<var class="term">string</var>[/ [IN]<var class="term">range</var>]</p>
<p>
<p>where the delimiting character (/ in the example above) can be any character not appearing in the string, with the exception of a blank character.</p>  
Where the delimiting character (<code>/</code> in the example above) can be any character not appearing in the string, with the exception of a blank character.</p>  


For example:
For example:
<p class="code">LO *ELEPHANT* IN CURRENT TO TOP</p>
<p class="code">LO *ELEPHANT* IN CURRENT TO TOP</p>
<p>If you do not specify a range, you do not need to include a delimiter after the string. If you specify an alphabetic delimiter, include a space between the LOCATE or LO keyword and the delimiter. If the delimiter is nonalphabetic, the space is not required.</p>
<p>
<p>See [[#Specifying range targets|Specifying range targets]] for more information about using a range. See [[#Range target characters|Range target characters]] for a list of range specifications.</p>
If you do not specify a range, you do not need to include a delimiter after the string. If you specify an alphabetic delimiter, include a space between the LOCATE or LO keyword and the delimiter. If the delimiter is nonalphabetic, the space is not required.</p>
<p>
See [[#Specifying range targets|Specifying range targets]] for more information about using a range. See [[#Range target characters|Range target characters]] for a list of range specifications.</p>


====Without LOCATE keyword====
====Without LOCATE keyword====
The second format, which does not require the LOCATE keyword, is as follows:
The second format, which does not require the LOCATE keyword, is as follows:
====Syntax====
<p class="code">[-] /<var class="term">string</var></p>
<p class="code">[-] /<var class="term">string</var></p>
<p>where a slash (/) must precede the string. If you do not specify a range, you do not need to include a slash following the string.</p>
<p>
<p>If the full-screen editor cannot find a match for the specified string, it displays the following message:</p>
where a slash (/) must precede the string. If you do not specify a range, you do not need to include a slash following the string.</p>
<p>
If the full-screen editor cannot find a match for the specified string, it displays the following message:</p>
<p class="code">TARGET STRING NOT LOCATED</p>
<p class="code">TARGET STRING NOT LOCATED</p>


===Searching forward===
===Searching forward===
<p>To search forward, enter one of the following formats:</p>
<p>
To search forward, enter one of the following formats:</p>
<p class="code">LOCATE /<var class="term">string</var>[/ [IN] <var class="term">range</var>]</p>
<p class="code">LOCATE /<var class="term">string</var>[/ [IN] <var class="term">range</var>]</p>
<p class="code">/<var class="term">string</var></p>
<p class="code">/<var class="term">string</var></p>
<p>The full-screen editor starts the search at the line following the current line and advances forward, stopping when it locates the string or reaches the end of the procedure. If the current line is the last line of the procedure, the full-screen editor wraps to the top of the procedure, begins the search at the top of the procedure, and ends at the current line.</p>
<p>
The full-screen editor starts the search at the line following the current line and advances forward, stopping when it locates the string or reaches the end of the procedure. If the current line is the last line of the procedure, the full-screen editor wraps to the top of the procedure, begins the search at the top of the procedure, and ends at the current line.</p>


===Searching backward===
===Searching backward===
<p>To backward, enter one of the following formats:</p>
<p>
To search backward, enter one of the following formats:</p>
<p class="code">-LOCATE /<var class="term">string</var>[/ [IN] <var class="term">range</var>]</p>
<p class="code">-LOCATE /<var class="term">string</var>[/ [IN] <var class="term">range</var>]</p>
<p class="code">-/<var class="term">string</var></p>
<p class="code">-/<var class="term">string</var></p>
<p>When you precede the command with a minus sign, the full-screen editor starts the search at the line preceding the current line and searches backward toward the beginning of the procedure, stopping when it locates the string or reaches the top of the procedure. If the current line is the top of the procedure, the full-screen editor wraps to the bottom of the procedure, begins the search at the bottom line, and ends at the current line.</p>
<p>
When you precede the command with a minus sign, the full-screen editor starts the search at the line preceding the current line and searches backward toward the beginning of the procedure, stopping when it locates the string or reaches the top of the procedure. If the current line is the top of the procedure, the full-screen editor wraps to the bottom of the procedure, begins the search at the bottom line, and ends at the current line.</p>


==Replacing a string (REPLACE)==
==Replacing a string (REPLACE)==
<p>
<p>
The REPLACE command replaces a string in the procedure with a substitute string. REPLACE provides the following capabilities:</p>
The REPLACE command replaces a string in the procedure with a substitute string. REPLACE provides the following capabilities:</p>
<ul>
<ul>
<li>
<li>
Displays each target string to verify the change before proceeding.</li>
Displays each target string to verify the change before proceeding.</li>
<li>
<li>
Changes more than one occurrence of a specified string in a single line. </li>
Changes more than one occurrence of a specified string in a single line. </li>
</ul>
</ul>
<p>
<p>
The format of the REPLACE command is as follows:</p>
The format of the REPLACE command is as follows:</p>
   
   
====Syntax====
====Syntax====
<p class="code"><b>R</b>EPLACE/<var class="term">string1</var>/<var class="term">string2</var> [<var class="term">n</var> | *] [<b>V</b>ERIFY [IN] <var class="term">range</var>]</p>
<p class="code"><b>R</b>EPLACE/<var class="term">string1</var>/<var class="term">string2</var> [<var class="term">n</var> | *] [<b>V</b>ERIFY [IN] <var class="term">range</var>]</p>
<p>If you include the <var class="term">n</var>, VERIFY, or range options in the REPLACE command, specify the options in the order shown.</p>  
<p>
If you include the <var class="term">n</var>, VERIFY, or range options in the REPLACE command, specify the options in the order shown.</p>  


For example:
For example:
Line 756: Line 790:


===Specifying a string===
===Specifying a string===
<p>Specify strings as follows:</p>
<p>
Specify strings as follows:</p>
<table>
<table>
<tr>
<tr>
Line 762: Line 797:
<td>String to be searched for and changed (old string).</td>
<td>String to be searched for and changed (old string).</td>
</tr>
</tr>
<tr>
<tr>
<td><var class="term">string2</var></td>
<td><var class="term">string2</var></td>
Line 768: Line 804:
</tr>
</tr>
</table>
</table>
<p>You can use as a delimiter any nonblank character (/ in the example above) that does not appear in <var class="term">
<p>
You can use as a delimiter any nonblank character (/ in the example above) that does not appear in <var class="term">
string1</var> or <var class="term">string2</var>. If you do not specify the number of occurrences, a VERIFY option, or a range, you do not need to include a delimiter after <var class="term">string2</var>.</p>
string1</var> or <var class="term">string2</var>. If you do not specify the number of occurrences, a VERIFY option, or a range, you do not need to include a delimiter after <var class="term">string2</var>.</p>


===Controlling the number of strings to be replaced===
===Controlling the number of strings to be replaced===
<p>You can replace all occurrences of a string or only the first occurrence in a line. The <var class="term">n</var> specification in the REPLACE command represents the number of occurrences of the search string (<var class="term">string1</var>) to be replaced in each line. If you omit an <var class="term">n</var> specification, only the first occurrence of the string is replaced in a line.</p>
<p>
<p>If you specify a value of *, all occurrences of the string are replaced in each line.</p>
You can replace all occurrences of a string or only the first occurrence in a line. The <var class="term">n</var> specification in the REPLACE command represents the number of occurrences of the search string (<var class="term">string1</var>) to be replaced in each line. If you omit an <var class="term">n</var> specification, only the first occurrence of the string is replaced in a line.</p>
<p>
If you specify a value of *, all occurrences of the string are replaced in each line.</p>


===Using the VERIFY option===
===Using the VERIFY option===
<p>The VERIFY option verifies all string replacements before they are made. Each line that contains a string that matches the specified string is highlighted and is delimited on the scale line by the characters of the proper length, on the column scale line directly beneath the potential match. For example:</p>
<p>
The VERIFY option verifies all string replacements before they are made. Each line that contains a string that matches the specified string is highlighted and is delimited on the scale line by the characters of the proper length, on the column scale line directly beneath the potential match. For example:</p>
<p class="code">&lt;====&gt;</p>
<p class="code">&lt;====&gt;</p>
<p>The column scale must be turned on to display the scale line characters. The following prompt appears on the command line each time a string is matched:</p>
<p>
The column scale must be turned on to display the scale line characters. The following prompt appears on the command line each time a string is matched:</p>
<p class="code">CHANGE?</p>
<p class="code">CHANGE?</p>
<p>Respond with any of the following choices:</p>
<p>
Respond with any of the following choices:</p>
<table>
<table>
<tr>
<tr class="head">
<th>This choice...</th>
<th>This choice...</th>
<th>Performs this action...</th>
<th>Performs this action...</th>
</tr>
</tr>
<tr>
<tr>
<td>YES, Y, or Enter</td>
<td>YES, Y, or Enter</td>
<td>Changes the string</td>
<td>Changes the string</td>
</tr>
</tr>
<tr>
<tr>
<td>NO or N</td>
<td>NO or N</td>
<td>Does not change the string</td>
<td>Does not change the string</td>
</tr>
</tr>
<tr>
<tr>
<td>ALL</td>
<td>ALL</td>
<td>Turns off the VERIFY option and makes all remaining changes</td>
<td>Turns off the VERIFY option and makes all remaining changes</td>
</tr>
</tr>
<tr>
<tr>
<td>STOP or S</td>
<td>STOP or S</td>
Line 803: Line 849:
</tr>
</tr>
</table>
</table>
<p>If you enter any other response, the full-screen editor displays the CHANGE? prompt again.</p>
<p>
If you enter any other response, the full-screen editor displays the <code>CHANGE</code>? prompt again.</p>


===Specifying a range===
===Specifying a range===
<p>You can specify a range of procedure lines to which the search applies. See [[#See Specifying range targets|Specifying range targets]] for more information about using a range. See [[#Range target characters|Range target characters]] for a list of range specifications.</p>
<p>
You can specify a range of procedure lines to which the search applies. See [[#See Specifying range targets|Specifying range targets]] for more information about using a range. See [[#Range target characters|Range target characters]] for a list of range specifications.</p>


==Inserting text==
==Inserting text==
<p>You can insert text several ways using the full-screen editor. Use the following commands to insert text:</p>
<p>
<table>
You can insert text several ways using the full-screen editor. Use the following commands to insert text:</p>
<tr>
<table class="thJustBold">
<tr class="head">
<th>This command...
<th>This command...
</th>
</th>
<th>Performs this action...</th>
<th>Performs this action...</th>
</tr>
</tr>
<tr>
<tr>
<td>E</td>
<th>E</th>
<td>Extends a line</td>
<td>Extends a line</td>
</tr>
</tr>
<tr>
<tr>
<td>I
<th>I
</td>
</th>
<td>Inserts separate lines</td>
<td>Inserts separate lines</td>
</tr>
</tr>
<tr>
<tr>
<td>I*</td>
<th>I*</th>
<td>Enters input mode</td>
<td>Enters input mode</td>
</tr>
</tr>
<tr>
<tr>
<td>GET</td>
<th>GET</th>
<td>Inserts a saved procedure</td>
<td>Inserts a saved procedure</td>
</tr>
</tr>
</table>
</table>
<p>You can also insert text using the REPLACE command to substitute a string with additional text for an existing string (see [[#Specifying a string|Specifying a string]]).</p>
<p>
<p>Alternatively, you can insert text by [[#Duplicating, copying, and moving text|duplicating, copying, and moving]] lines or blocks of text.</p>
You can also insert text using the REPLACE command to substitute a string with additional text for an existing string (see [[#Specifying a string|Specifying a string]]).</p>
<p>
Alternatively, you can insert text by [[#Duplicating, copying, and moving text|duplicating, copying, and moving]] lines or blocks of text.</p>
   
   
===Extending a line===
===Extending a line===
<p>The E (extend) prefix command inserts a physical line immediately following the line that contains the E, forming a logical line extension. The line is filled with the fill character (that is, blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see [[#Specifying a fill character|Specifying a fill character]].</p>
<p>
The E (extend) prefix command inserts a physical line immediately following the line that contains the E, forming a logical line extension. The line is filled with the fill character (that is, blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see [[#Specifying a fill character|Specifying a fill character]].</p>
   
   
===Inserting lines===
===Inserting lines===
<p> The I (insert) prefix command  inserts one or more lines following the line containing the I. Unlike E lines, these lines are treated as separate lines, not as continuations of existing lines in the procedure.</p>
<p>
The I (insert) prefix command  inserts one or more lines following the line containing the I. Unlike E lines, these lines are treated as separate lines, not as continuations of existing lines in the procedure.</p>
<p>The format of the I prefix command is:</p>
<p>The format of the I prefix command is:</p>
   
   
====Syntax====
====Syntax====
<p class="code">I[<var class="term">n</var>]</p>
<p class="code">I[<var class="term">n</var>]</p>
<p>If you enter I alone, the full-screen editor inserts one line following the line containing the I. If you enter I followed by a number, the full-screen editor inserts the specified number of lines. For example, I5 inserts 5 blank lines after the line that contains the command.</p>
<p>
<p>Inserted lines are filled with the fill character (blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see [[#Specifying a fill character|Specifying a fill charcter]].</p>  
If you enter I alone, the full-screen editor inserts one line following the line containing the I. If you enter I followed by a number, the full-screen editor inserts the specified number of lines. For example, I5 inserts 5 blank lines after the line that contains the command.</p>
<p>
Inserted lines are filled with the fill character (blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see [[#Specifying a fill character|Specifying a fill charcter]].</p>  
   
   
===Specifying a fill character===
===Specifying a fill character===
<p>The FILL command specifies a fill character. When the full-screen editor displays a line of text, it pads the line on the right with either null or blank characters. The format of the FILL command is as follows:</p>
<p>
The FILL command specifies a fill character. When the full-screen editor displays a line of text, it pads the line on the right with either null or blank characters. The format of the FILL command is as follows:</p>
   
   
====Syntax====
====Syntax====
<p class="code">[SET] FILL {<u>NULL</u> | BLANK}</p>
<p class="code">[SET] FILL {<u>NULL</u> | BLANK}</p>
<p>If you specify FILL NULL, the full-screen editor pads with null characters on the right. If you specify FILL BLANK, the full-screen editor pads with blank characters on the right.</p>
<p>
<p>The character selected as the fill character is inserted in lines generated using the E (extend) and I (insert) prefix commands.</p>
If you specify <code>FILL NULL</code>, the full-screen editor pads with null characters on the right. If you specify <code>FILL BLANK</code>, the full-screen editor pads with blank characters on the right.</p>
<p>
The character selected as the fill character is inserted in lines generated using the E (extend) and I (insert) prefix commands.</p>
   
   
<p class="note"><b>Note:</b> The command line on the display screen is always filled with null characters, regardless of the specified fill character.</p>
<p class="note"><b>Note:</b> The command line on the display screen is always filled with null characters, regardless of the specified fill character.</p>


===Entering input mode===
===Entering input mode===
<p>The I* prefix command places the full-screen editor in input mode. The line that contains I* becomes the current line and appears at the top of the screen. The rest of the screen is blank. Any lines following the I* line in the original procedure are not displayed.</p>
<p>
<p>For input lines, the cursor appears in column 1 of the first blank line. You can now enter text. If you press Enter, the last line that you typed is moved to the top of the screen and the cursor appears on the next (blank) line. To exit from input mode, either press Enter twice without any intervening text editing, or enter any full-screen editor command on the command line.</p>
The I* prefix command places the full-screen editor in input mode. The line that contains I* becomes the current line and appears at the top of the screen. The rest of the screen is blank. Any lines following the I* line in the original procedure are not displayed.</p>
<p>
For input lines, the cursor appears in column 1 of the first blank line. You can now enter text. If you press Enter, the last line that you typed is moved to the top of the screen and the cursor appears on the next (blank) line. To exit from input mode, either press Enter twice without any intervening text editing, or enter any full-screen editor command on the command line.</p>
   
   
===Inserting a saved procedure===
===Inserting a saved procedure===
<p>The GET command inserts a previously saved procedure after the current line. You can insert a procedure that is stored in either the default procedure file or in a file specified in the command (with the filespec option). The last line of the inserted procedure becomes the current line and is positioned at the center of the display screen.</p>
<p>
<p>Before you issue the GET command, position the cursor at the appropriate line. For example, if you want to add one procedure to the end of another, use the BOTTOM command to advance the cursor to the end of the procedure before the procedure is added.</p>
The GET command inserts a previously saved procedure after the current line. You can insert a procedure that is stored in either the default procedure file or in a file specified in the command (with the filespec option). The last line of the inserted procedure becomes the current line and is positioned at the center of the display screen.</p>
<p>The format of the GET command is:</p>
<p>
Before you issue the GET command, position the cursor at the appropriate line. For example, if you want to add one procedure to the end of another, use the BOTTOM command to advance the cursor to the end of the procedure before the procedure is added.</p>
   
   
====Syntax====
====Syntax====
<p>The format of the GET command is:</p>
<p class="code">[IN <var class="term">filespec</var>] GET <var class="term">procname</var></p>
<p class="code">[IN <var class="term">filespec</var>] GET <var class="term">procname</var></p>
<p>where:</p>  
<p>Where:</p>  
<ul>
<ul>
<li><var class="term">filespec</var> is the name of the procedure file in which the combined procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group.
<li><var class="term">filespec</var> is the name of the procedure file in which the combined procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group.
<p>The format for filespec is:</p>
<p>
<p class="syntax">[[{PERM | TEMP} GROUP] | <u>FILE</u>] <var class="term">name</var></p>
The format for filespec is:</p>
<p>For example:</p>
<p class="syntax">[[{PERM | TEMP} GROUP] | <u>FILE</u>] <span class="term">name</span></p>
<p class="syntax">FILE PAYROLL
<p>
For example:</p>
<p class="code">FILE PAYROLL
TEMP GROUP EMPINFO
TEMP GROUP EMPINFO
ACCOUNT</p>
ACCOUNT</p>
<p>
If neither FILE nor GROUP is specified, FILE is the default.</p>
</li>


If neither FILE nor GROUP is specified, FILE is the default.
</li>
<li><var class="term">procname</var> is the name of the procedure to be inserted after the current line. This procedure can be stored in any Model 204 file that you currently have open.</li>
<li><var class="term">procname</var> is the name of the procedure to be inserted after the current line. This procedure can be stored in any Model 204 file that you currently have open.</li>
</ul>
</ul>
Line 887: Line 956:
==Duplicating, copying, and moving text==
==Duplicating, copying, and moving text==
<p>
<p>
You can save keystrokes and reorganize text by using the full-screen editor commands for the following tasks:</p>
You can save keystrokes and reorganize text by using the full-screen editor commands for the following tasks:</p>
<ul>
<ul>
<li>
<li>
Duplicating lines of text (&quot; or &quot;&quot;)</li>
Duplicating lines of text (&quot; or &quot;&quot;)</li>
<li>
<li>
Copying lines of text (C or CC)</li>
Copying lines of text (C or CC)</li>
<li>
<li>
Moving lines of text (M or MM)</li>
Moving lines of text (M or MM)</li>
</ul>
</ul>
<p>Groups of lines are also referred to as blocks. You can also [[#Deleting and undeleting text|delete and undelete lines of text]].</p>
<p>
Groups of lines are also referred to as blocks. You can also [[#Deleting and undeleting text|delete and undelete lines of text]].</p>
   
   
===Duplicating lines or blocks===
===Duplicating lines or blocks===
<p>You can duplicate either one line or a block of lines.</p>
<p>
You can duplicate either one line or a block of lines.</p>
   
   
====Duplicating one or more lines====
====Duplicating one or more lines====
<p>The duplicate (&quot;) prefix command duplicates the line on which it is entered. The format of the duplicate command is as follows:</p>
<p>
The duplicate (&quot;) prefix command duplicates the line on which it is entered. The format of the duplicate command is as follows:</p>
====Syntax====
 
<p class="code">&quot;[<var class="term">n</var>]</p>
<p class="code">&quot;[<var class="term">n</var>]</p>
<p>where <var class="term">n</var> is the number of copies. If you enter &quot;, the full-screen editor inserts one copy of the line. If you enter &quot; followed by a number, the full-screen editor inserts the specified number of duplicate lines. For example, &quot;5 duplicates a line five times.</p>
<p>
Where <var class="term">n</var> is the number of copies.  
 
If you enter <code>&quot;</code>, the full-screen editor inserts one copy of the line. If you enter <code>&quot;</code> followed by a number, the full-screen editor inserts the specified number of duplicate lines. For example, <code>&quot;5</code> duplicates a line five times.</p>
   
   
====Duplicating a block of text====
====Duplicating a block of text====
<p>The duplicate block (&quot;&quot;) prefix command duplicates a group of lines. Entering &quot;&quot; duplicates the block of lines beginning with the line on which the first &quot;&quot; is specified and ending with the line on which the second &quot;&quot; is specified. The format of this command is as follows:</p>
<p>
The duplicate block (<code>&quot;&quot;</code>) prefix command duplicates a group of lines. Entering <code>&quot;&quot;</code> duplicates the block of lines beginning with the line on which the first <code>&quot;&quot;</code> is specified and ending with the line on which the second <code>&quot;&quot;</code> is specified.  
====Syntax====
 
<p class="code">&quot;&quot;[<var class="term">n</var>]</p>
The format of this command is as follows:</p>
<p>where <var class="term">n</var> is the number of copies. If you enter &quot;&quot;, the full-screen editor inserts one copy of the block of lines. The block appears immediately following the line that contains the second &quot;&quot; (the last line of the block). If you enter &quot;&quot; followed by a number, the full-screen editor duplicates the block the specified number of times.</p>
 
<p class="syntax">&quot;&quot;[<span class="term">n</span>]</p>
<p>
Where <var class="term">n</var> is the number of copies.  
 
If you enter <code>&quot;&quot;</code>, the full-screen editor inserts one copy of the block of lines. The block appears immediately following the line that contains the second <code>&quot;&quot;</code> (the last line of the block). If you enter <code>&quot;&quot;</code> followed by a number, the full-screen editor duplicates the block the specified number of times.</p>
   
   
===Copying lines or blocks===
===Copying lines or blocks===
<p>The C (copy) prefix command copies one or more lines to the position indicated by the P (precedes) or F (follows) prefix target. If you specify P, the line(s) are inserted just before the line that contains the P. If you specify F, the lines are inserted just after the line that contains the F. For more information about prefix targets, see [[#Using targets with prefix commands|Using targets with prefix commands]].</p>
<p>
<p>The format of the C prefix command is as follows:</p>
The C (copy) prefix command copies one or more lines to the position indicated by the P (precedes) or F (follows) prefix target. If you specify P, the line(s) are inserted just before the line that contains the P. If you specify F, the lines are inserted just after the line that contains the F. For more information about prefix targets, see [[#Using targets with prefix commands|Using targets with prefix commands]].</p>
<p>
The format of the C prefix command is as follows:</p>
   
   
====Syntax====
<p class="syntax">C[<span class="term">n</span>]</p>
<p class="code">C[<var class="term">n</var>]</p>
<p>
<p>where <var class="term">n</var> is the number of lines to copy. If you enter C, the full-screen editor copies only the line that contains the C. If you enter C followed by a number, the full-screen editor copies the specified number of lines, beginning with the line containing the C<var class="term">n</var>. When a line is copied, it is preserved in its original position as well as being duplicated in the new position.</p>
Where <var class="term">n</var> is the number of lines to copy.  
<p>The CC (copy block) prefix command copies a group of lines without requiring you to count them. CC copies the block of lines that begins with the line on which the first CC is specified and that ends with the line on which the second CC is specified. The lines are copied to the position indicated by the P (precedes) or F (follows) prefix target, as discussed for C.</p>
 
If you enter <code>C</code>, the full-screen editor copies only the line that contains the C. If you enter <code>C</code> followed by a number, the full-screen editor copies the specified number of lines, beginning with the line containing the C<var class="term">n</var>.  
 
When a line is copied, it is preserved in its original position as well as being duplicated in the new position.</p>
<p>
The CC (copy block) prefix command copies a group of lines without requiring you to count them. CC copies the block of lines that begins with the line on which the first CC is specified and that ends with the line on which the second CC is specified. The lines are copied to the position indicated by the P (precedes) or F (follows) prefix target, as discussed for C.</p>
   
   
===Moving lines or blocks===
===Moving lines or blocks===
<p>The M (move) prefix command moves one or more lines to the position indicated by the P (precedes) or F (follows) [[#Using targets with prefix commands|prefix target]]. If you specify P, the line(s) are inserted just before the line containing the P. If you specify F, the line(s) are inserted just after the line that contains the F.</p>
<p>
<p>The format of the M prefix command is as follows:</p>
The M (move) prefix command moves one or more lines to the position indicated by the P (precedes) or F (follows) [[#Using targets with prefix commands|prefix target]]. If you specify P, the line(s) are inserted just before the line containing the P. If you specify F, the line(s) are inserted just after the line that contains the F.</p>
<p>
====Syntax====
The format of the M prefix command is as follows:</p>
 
<p class="code">M[<var class="term">n</var>]</p>
<p class="code">M[<var class="term">n</var>]</p>
<p>where <var class="term">n</var> is the number of lines to move. If you enter M, the full-screen editor moves only the line that contains the M. If you enter M followed by a number, the full-screen editor moves the specified number of lines, beginning with the line that contains the M<var class="term">n</var>. When a line is moved, it is automatically deleted from its original position.</p>
<p>
Where <var class="term">n</var> is the number of lines to move.  


<p>The MM (move block) prefix command moves a group of lines without requiring you to count them. MM moves the block of lines that begins with the line on which the first MM is specified and that ends with the line on which the second MM is specified. The lines are moved to the position indicated by the P (precedes) or F (follows) [[#Using targets with prefix commands|prefix target]].</p>
If you enter M, the full-screen editor moves only the line that contains the M. If you enter M followed by a number, the full-screen editor moves the specified number of lines, beginning with the line that contains the M<var class="term">n</var>. When a line is moved, it is automatically deleted from its original position.</p>
<p>
The MM (move block) prefix command moves a group of lines without requiring you to count them. MM moves the block of lines that begins with the line on which the first MM is specified and that ends with the line on which the second MM is specified. The lines are moved to the position indicated by the P (precedes) or F (follows) [[#Using targets with prefix commands|prefix target]].</p>


==Deleting and undeleting text==
==Deleting and undeleting text==
Line 940: Line 1,030:
===Deleting lines or blocks===
===Deleting lines or blocks===
<p>
<p>
  The D (delete) prefix command deletes one or more lines from the procedure. The format of the D prefix command is as follows:</p>
  The D (delete) prefix command deletes one or more lines from the procedure.  
 
====Syntax ====
The format of the D prefix command is as follows:</p>
<p class="code">D[<var class="term">n</var>]</p>
<p class="code">D[<var class="term">n</var>]</p>
<p>where <var class="term">n</var> is the number of lines to delete. If you enter D, the full-screen editor deletes only the line that contains the D. If you enter D followed by a number, the full-screen editor deletes the specified number of lines, beginning with the line that contains the D. If the number of lines specified in the D command exceeds the number remaining in the procedure, the full-screen editor deletes all lines from the line on which the D command is specified to the end of the procedure.</p>
<p>
<p>When a line or set of lines is deleted, the lines are not immediately discarded; they are placed on the full-screen editor delete stack. Entries in this stack are deleted when the editing session is terminated. Each time a D command is executed, an entry is placed on the delete stack. A D<var class="term">n</var> command, which deletes several lines, causes a single entry that contains the specified block of lines to be placed on the stack. However, a series of contiguous lines, each containing a D command, is not accumulated into a single entry on the delete stack. You can [[#Undeleting lines or blocks|retrieve or undelete an entry]] by means of the U command.</p>
Where <var class="term">n</var> is the number of lines to delete.  
<p>The DD (delete block) prefix command deletes a group of lines without requiring you to count them. DD deletes the block of lines that begins with the line on which the first DD is specified and that ends with the line on which the second DD is specified. The block is placed on the delete stack as a single entity.</p>
 
If you enter D, the full-screen editor deletes only the line that contains the D. If you enter D followed by a number, the full-screen editor deletes the specified number of lines, beginning with the line that contains the D. If the number of lines specified in the D command exceeds the number remaining in the procedure, the full-screen editor deletes all lines from the line on which the D command is specified to the end of the procedure.</p>
<p>
When a line or set of lines is deleted, the lines are not immediately discarded; they are placed on the full-screen editor delete stack. Entries in this stack are deleted when the editing session is terminated. Each time a D command is executed, an entry is placed on the delete stack. A D<var class="term">n</var> command, which deletes several lines, causes a single entry that contains the specified block of lines to be placed on the stack. However, a series of contiguous lines, each containing a D command, is not accumulated into a single entry on the delete stack. You can [[#Undeleting lines or blocks|retrieve or undelete an entry]] by means of the U command.</p>
<p>
The DD (delete block) prefix command deletes a group of lines without requiring you to count them. DD deletes the block of lines that begins with the line on which the first DD is specified and that ends with the line on which the second DD is specified. The block is placed on the delete stack as a single entity.</p>


===Undeleting lines or blocks===
===Undeleting lines or blocks===
<p>The U (undelete) prefix command retrieves the last entry that was deleted (that is, placed on the delete stack) and inserts it after the line that contains the U.</p>
<p>
The U (undelete) prefix command retrieves the last entry that was deleted (that is, placed on the delete stack) and inserts it after the line that contains the U.</p>


==Exiting from the full-screen editor==
==Exiting from the full-screen editor==
<p>To exit from the full-screen editor or to save edited procedures, use the commands listed in the following table, which also lists the description of each command and where more information is located. When you exit from the full-screen editor, you are returned to the Model 204 command level.</p>
<p>
<table>
To exit from the full-screen editor or to save edited procedures, use the commands listed in the following table, which also lists the description of each command and where more information is located. When you exit from the full-screen editor, you are returned to the Model 204 command level.</p>
<table class="thJustBold">
<CAPTION>
<CAPTION>
Exit and save commands
Exit and save commands
</CAPTION>
</CAPTION>
<tr>
<tr class="head">
<th>This command...</th>
<th>This command...</th>
<th>Performs this action...</th>
<th>Performs this action...</th>
</tr>
</tr>
<tr>
<tr>
<td>END</td>
<th>END</th>
<td>Exits from the full-screen editor and saves the edited procedures.</td>
<td>Exits from the full-screen editor and saves the edited procedures.</td>
</tr>
</tr>
<tr>
<tr>
<td>GO</td>
<th>GO</th>
<td>
<td>
<p>Exits from the full-screen editor, saves the edited procedure, and includes (executes) the edited procedure.</p>
<p>Exits from the full-screen editor, saves the edited procedure, and includes (executes) the edited procedure.</p>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>QUIT</td>
<th>QUIT</th>
<td>Exits from the full-screen editor, might prompt if changes were made to the procedure, and does not save the edited procedure.</td>
<td>Exits from the full-screen editor, might prompt if changes were made to the procedure, and does not save the edited procedure.</td>
</tr>
</tr>
<tr>
<tr>
<td>SAVE</td>
<th>SAVE</th>
<td>Does not exit from the full-screen editor, but saves the edited procedure.</td>
<td>Does not exit from the full-screen editor, but saves the edited procedure.</td>
</tr>
</tr>
</table>
</table>
<p>For more information about exit and save commands, refer to the [[EDIT command]].</p>
<p>
For more information about exit and save commands, refer to the [[EDIT command]].</p>
   
   
===Exiting from the editor and saving the procedure (END)===
===Exiting from the editor and saving the procedure (END)===
<p>The END command exits from the full-screen editor and saves the edited procedure on disk. Specify the name under which the procedure is to be saved. You can store the procedure in either the default procedure file or in a file specified in the command.</p>
<p>The format of the END command is as follows:</p>
====Syntax====
<p class="code">[IN <var class="term">filespec</var>] END [<var class="term">procname</var>]</p>
<p>
<p>
where:</p>
The END command exits from the full-screen editor and saves the edited procedure on disk. Specify the name under which the procedure is to be saved. You can store the procedure in either the default procedure file or in a file specified in the command.</p>
<p>
The format of the END command is as follows:</p>
<p class="syntax">[IN <span class="term">filespec</span>] END [<span class="term">procname</span>]</p>
<p>
Where:</p>
<ul>
<ul>
<li><var class="term">filespec</var> is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the default Model 204 procedure file. The filespec can identify a Model 204 file or a temporary or permanent group. The file specified by IN filespec must be open. <p>The format of <var class="term">filespec</var> is:</p>
<li><var class="term">filespec</var> is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the default Model&nbsp;204 procedure file. The filespec can identify a Model&nbsp;204 file or a temporary or permanent group. The file specified by IN filespec must be open.  
<p class="syntax">[[{PERM | TEMP} GROUP] | <u>FILE</u>] <var class="term">name</var></p>
<p>
<p>For example:</p>
The format of <var class="term">filespec</var> is:</p>
FILE PAYROLL
<p class="syntax">[[{PERM | TEMP} GROUP] | <u>FILE</u>] <span class="term">name</span></p>
TEMP GROUP EMPINFO
<p>
<p>If you do not specify either FILE or GROUP, FILE is assumed. For more information about files and groups, see the following Model 204 documentation wiki pages:</p>
For example:</p>
FILE PAYROLL
TEMP GROUP EMPINFO
<p>
If you do not specify either FILE or GROUP, FILE is assumed. For more information about files and groups, see the following pages:</p>
<ul>
<ul>
<li>[[CREATE command: File]]</li>
<li>[[CREATE command: File]]</li>
<li>[[CREATE command: Permanent group]]</li>
<li>[[CREATE command: Permanent group]]</li>
<li>[[CREATE command: Temporary group]]</li>
<li>[[CREATE command: Temporary group]]</li>
</ul>
</ul></li>
 
<li><var class="term">procname</var> is the name under which the edited procedure is to be saved.</li>
<li><var class="term">procname</var> is the name under which the edited procedure is to be saved.</li>
</ul>
</ul>
<p>If you enter END, the procedure is saved under the name of the output procedure specified when you invoked the editor. The procedure is stored in the Model 204 default procedure file.</p>
<p>
If you enter END, the procedure is saved under the name of the output procedure specified when you invoked the editor. The procedure is stored in the Model 204 default procedure file.</p>


===Saving and including the procedure (GO)===
===Saving and including the procedure (GO)===
<p>Like the END command, the GO command exits from the full-screen editor and saves the edited procedure. Unlike END, GO automatically performs an implicit Model 204 [[INCLUDE command]], which executes the Model 204 commands in the saved procedure.</p>
<p>
Like the END command, the GO command exits from the full-screen editor and saves the edited procedure. Unlike END, GO automatically performs an implicit Model 204 [[INCLUDE command]], which executes the Model 204 commands in the saved procedure.</p>


The format of the GO command is as follows:
The format of the GO command is as follows:
<p class="syntax">[IN <span class="term">filespec</span>] GO [<span class="term">procname</span>]</p>
====Syntax====
<p>
<p class="code">[IN <var class="term">filespec</var>] GO [<var class="term">procname</var>]</p>
GO command options are identical to END command options. If you enter GO, the full-screen editor saves the procedure under the name of the output procedure specified when you invoked the full-screen editor. The procedure is stored in the Model 204 default procedure file.</p>
<p>GO command options are identical to END command options. If you enter GO, the full-screen editor saves the procedure under the name of the output procedure specified when you invoked the full-screen editor. The procedure is stored in the Model 204 default procedure file.</p>
   
   
===Exiting from the editor without saving the edited procedure (QUIT)===
===Exiting from the editor without saving the edited procedure (QUIT)===
<p>The QUIT command exits from the full-screen editor.</p>
<p>
<p>The syntax is as follows:</p>
The QUIT command exits from the full-screen editor.</p>
<p>
====Syntax====
The syntax is as follows:</p>
<p class="code">QUIT</p>
<p class="code">QUIT</p>
<p>If you change the procedure during the current editing session and exit by entering QUIT, the full-screen editor displays the following message, which indicates that the procedure was changed and requests that you to enter QUIT again, if you want to exit the procedure without saving the edits:</p>
<p>
If you change the procedure during the current editing session and exit by entering QUIT, the full-screen editor displays the following message, which indicates that the procedure was changed and requests that you to enter QUIT again, if you want to exit the procedure without saving the edits:</p>
<p class="code">PROCEDURE HAS BEEN MODIFIED, ENTER 'QUIT' TO VERIFY.</p>
<p class="code">PROCEDURE HAS BEEN MODIFIED, ENTER 'QUIT' TO VERIFY.</p>
<p>Respond in one of the following ways:</p>
<p>
Respond in one of the following ways:</p>
<ul>
<ul>
<li>Enter QUIT on the command line to confirm that changes are not to be saved.</li>
<li>Enter QUIT on the command line to confirm that changes are not to be saved.</li>
<li>Ignore the prompt and continue editing.</li>
<li>Ignore the prompt and continue editing.</li>
</ul>
</ul>
<p>To exit without receiving the warning prompt, enter the following command:</p>
<p>
To exit without receiving the warning prompt, enter the following command:</p>
<p class="code">QUIT QUIT</p>
<p class="code">QUIT QUIT</p>
<p>If you use QUIT to exit from a file that was examined but not modified, the full-screen editor does not prompt before exiting.</p>
<p>
<p>You can also press PF3 to quit. Your edits are not saved.</p>
If you use QUIT to exit from a file that was examined but not modified, the full-screen editor does not prompt before exiting.</p>
<p>
You can also press PF3 to quit. Your edits are not saved.</p>
   
   
===Saving the procedure (SAVE)===
===Saving the procedure (SAVE)===
<p>The SAVE command saves the edited procedure or a subset of that procedure under the specified name (<var class="term">
<p>
The SAVE command saves the edited procedure or a subset of that procedure under the specified name (<var class="term">
procname</var>) or the default procedure name. Unlike the END, GO, and QUIT commands, SAVE does not exit from the editor. To ensure against the loss of changes due to a system failure, issue the SAVE command periodically while you edit a procedure.</p>
procname</var>) or the default procedure name. Unlike the END, GO, and QUIT commands, SAVE does not exit from the editor. To ensure against the loss of changes due to a system failure, issue the SAVE command periodically while you edit a procedure.</p>
<p>The format of the SAVE command is as follows:</p>
====Syntax====
<p class="code">[IN <var class="term">filespec</var>] SAVE [<var class="term">procname</var> | <var class="term">procname</var>] [[IN] <var class="term">range</var>]</p>
<p>
<p>
where:</p>
The format of the SAVE command is as follows:</p>
<p class="syntax">[IN <span class="term">filespec</span>] SAVE [<span class="term">procname</span> | <span class="term">procname</span>] [[IN] <span class="term">range</span>]</p>
<p>
Where:</p>
<ul>
<ul>
<li><var class="term">filespec</var> is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group. The file specified with IN filespec must be open. It has the same syntax as described for the END command.</li>
<li><var class="term">filespec</var> is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group. The file specified with IN filespec must be open. It has the same syntax as described for the END command.</li>
<li><var class="term">procname</var> is the name under which the edited procedure is to be saved.</li>
<li><var class="term">procname</var> is the name under which the edited procedure is to be saved.</li>
<li>range is the range to be saved. Note that if you specify range, you must also specify procname. You can include any of the [[#Range target characters|range specifications]]. If you omit a range, the entire procedure is saved.</li>
<li>range is the range to be saved. Note that if you specify range, you must also specify procname. You can include any of the [[#Range target characters|range specifications]]. If you omit a range, the entire procedure is saved.</li>
</ul>
</ul>
<p>If you enter SAVE alone, the full-screen editor saves the entire procedure under the name of the output procedure specified when the editor was invoked. The procedure is stored in the Model 204 default procedure file.</p>
<p>
If you enter SAVE alone, the full-screen editor saves the entire procedure under the name of the output procedure specified when the editor was invoked. The procedure is stored in the Model&nbsp;204 default procedure file.</p>


[[Category: Model 204 editor]]
[[Category: Model 204 editor]]

Revision as of 21:39, 17 November 2015

Overview

The full-screen editor enables you to use the special capabilities of the IBM 3270 and compatible terminals.

Model 204 provides the following editors, which you can use to enter, change, or add text to Model 204 requests and procedures:

Full-screen editor Available for full-screen terminals.
Line editor Available for line-at-a-time terminals. Optionally, you can invoke this editor from a full-screen terminal.

This topic describes how to use the full-screen editor. Model 204 line editor describes the line editor.

Editing capabilities

Special features of the full-screen editor include:

  • Full-screen mode

You are always in full-screen mode, even when text is being entered or added to a procedure. You can position the cursor at any text on the display screen and delete, insert, or change characters by typing at that point.

  • Special screen display

The display screen contains a display area and, optionally, either a prefix or a suffix area for entry of prefix commands to perform editing operations. (See Using targets with prefix commands.) You can display a column scale at the center of the screen to facilitate the positioning of text in specific columns.

  • Automatic text wrapping

Lines that are longer than the normal display line are automatically wrapped onto subsequent display line(s).

  • Global text searches

You can search throughout a procedure for any string of characters. You can replace characters and specify wildcard characters to match all or part of the specified string. This feature is described in Specifying a string.

  • Prefixes and targets

You can specify both editing operations (prefixes) and the lines on which the edits are to be performed (targets) by entering abbreviated commands in the prefix or suffix area of the screen. Prefixes and targets are described in Specifying range targets.

  • PF key functions

Use PF3 to quit, PF7 to scroll backward, PF8 to scroll forward, and PF9 to repeat commands while editing in full-screen mode.

Invoking the full-screen editor

Model 204 requirements

Before invoking the full-screen editor, set the Model 204 LOUTPB parameter to a minimum value of 3000. The LOUTPB parameter specifies the length of the output page buffer for 3270 terminals that use the full-screen capabilities.

Invoking the editor

You can invoke the full-screen editor in the following ways:

  • Directly from Model 204 command level
  • Indirectly in a User Language (SOUL) request

To invoke the full-screen editor from a terminal, enter the EDIT command.

Using the EDIT command

To invoke the full-screen editor, use the EDIT command. The format of the EDIT command is as follows:

Syntax

EDIT(SCREEN)[oldproc,newproc]

Specifying the type of editor

You can include a parameter that indicates which of the Model 204 editors to invoke. To request the full-screen editor, enter:

EDIT (SCREEN)

To request the line editor, enter:

EDIT (LINE)

If you do not specify either SCREEN or LINE, the appropriate editor for your terminal type is invoked. For example, if your terminal is an IBM 3270 and you enter EDIT while at command level or while executing a SOUL request, the full-screen editor is invoked automatically. The full-screen editor is not available from an IBM 3270 terminal that is connected to Model 204 through an access method that does not support full-screen input and output.

Specifying an input procedure

Use the oldproc parameter to name a temporary or permanent procedure to be used as input for the current editing session. If you do not specify an oldproc option, the full-screen editor creates a temporary procedure (Model 204 temporary procedure 0). Note that you cannot use the full-screen editor to create a new and permanent procedure if you specify a nonexistent input procedure.

Specifying an output procedure

Use the newproc parameter to specify an output procedure name. You can include an output procedure name in the EDIT command or specify a name when you exit from the procedure with an END, GO, or SAVE command. After the editing session terminates, Model 204 saves the procedure under the specified newproc name. If you specify a newproc parameter in the EDIT command and enter a procname parameter when exiting from the procedure, the procname parameter specified when exiting overrides the name specified in the EDIT command.

Rules for procedure names

The oldproc and newproc names can consist of any combination of letters, numbers, and symbols, except:

  • Blank or space
  • Comma
  • Semicolon
  • Minus sign
  • Equal sign
  • Single quote
  • Carriage return

The maximum length of a procedure name is 255 characters.

Results of using the EDIT command

After you invoke the full-screen editor, use any of the commands described in this chapter. When you enter the full-screen editor, the first portion of the procedure to be edited appears in the display area and the cursor appears at the beginning of the command line. To reposition the cursor to the command line, press the HOME key (usually ALT-BACKTAB).

When you issue an EDIT command, the full-screen editor writes the following message to the Model 204 audit trail:

M204.0685: EDITING INTO newproc

Invoking the editor indirectly

You can invoke the full-screen editor indirectly by including the EDIT command in a SOUL request by using the TERMINAL option in the following format:

Syntax

EDIT (TERMINAL)

TERMINAL option of EDIT

The TERMINAL option invokes the full-screen editor from within a procedure and connects the editor to your terminal for input. For more information about the TERMINAL option, refer to the Model 204 EDIT command wiki page.

Display screen format

The typical format of the display screen during an editing session is shown in the following figure.

The areas numbered in the diagram are described below the figure.

Sample Display Screen

Screen components

The components of the display screen are:

  1. Header Line

    The top line of the screen is reserved for procedure identification. The header line contains the following information:

    • Old procedure name (before editing)
    • New procedure name (after editing)
    • Line number of the current line within the procedure
    • Current maximum line number within the procedure
  2. Message Line

    The second line is reserved for error and status messages.

  3. Command Line

    The third line is reserved for the entry of screen commands. This line begins with the following command prompt:

    ===>

    You can enter a command in uppercase or lowercase letters or a combination of the two.

    See Model 204 full-screen editor commands for abbreviations and defaults for full-screen commands.

    Enter one command at a time. If you enter more than one command, only the first command is executed.

  4. Display Area

    The display area contains a portion of the text that is being edited. The text on the screen is considered a window in which only part of the procedure currently being edited appears.

    To manipulate displayed procedures, first position the cursor and then add, change, or delete text. To execute changes, press the Enter key.

    To position other parts of the procedure in the edit window, you can use the display commands or PF keys to scroll forward and backward through the procedure.

  5. Prefix or Suffix Area

    This area can either precede or follow the display area on the screen. The columns typically display the following special characters:

    =====

    You can replace one or more of these equal signs with a special prefix command to perform an editing function, such as inserting or deleting text on the corresponding line in the display area. See Summary of prefix commands for more information about prefix commands.

  6. Current Line

    The line being edited normally appears at the center of the screen and is highlighted (that is, displayed more brightly than the surrounding text).

    The line pointer points to the current line. The line pointer is repositioned to a new current line when you scroll forward and backward and when you execute screen commands. You can position the line pointer at a new current line by specifying the set line prefix command (/).

  7. Column Scale

    The column scale indicates the column position of the procedure text that appears. You can display a column scale immediately below the center line (normally the current line) in the display area. The scale is useful when text must be entered in particular columns.

Requesting a column scale

The SCALE command specifies whether or not the full-screen editor displays a column scale in the center of the display area on the screen. The format of the SCALE command is:

Syntax

[SET] SCALE {OFF | ON}

SCALE OFF is the default.

If you specify SCALE OFF, the column scale is not displayed. If you specify SCALE ON, the scale is displayed. The column scale is shown in the sample display screen.

Positioning the prefix area

The PREFIX command positions the prefix area on the left (prefix) or right (suffix) side of the display screen. PREFIX LEFT is the default. The format of the PREFIX command is as follows:

Syntax

[SET] PREFIX {LEFT | RIGHT}

The full-screen editor positions the prefix area at the end of each line of the display area when you specify PREFIX RIGHT, and at the beginning of each line when you specify PREFIX LEFT.

The sample display screen shows the positioning of the prefix area on the left side of the display screen.

For a description of the prefix commands that can be entered in this area, see Using targets with prefix commands.

Editing modes

The editing modes are:

  • Command mode (used primarily for editing)
  • Input mode (used primarily for entering new text)

Command mode

When you invoke the full-screen editor, you are placed in command mode. To position the cursor to the command line, press the HOME key (usually ALT/BACKTAB).

In command mode, you enter commands for the full-screen editor either on the command line or in the prefix area.

Input mode

Enter input mode to type new lines of text. To enter input mode, specify an I* prefix command. You cannot use the prefix commands in input mode.

To return to command mode from input mode, press the Enter key twice without any intervening text.

Using targets

Some prefix and full-screen editor commands operate on a line or set of lines called a target.

For example, if you want to search for a text string within lines 10 and 20 of a procedure, lines 10 through 20 are considered target lines.

Specify a target on the appropriate line in the prefix or suffix area of the screen.

When specifying a target, you can use uppercase and lowercase interchangeably. Targets are specified as one of the following:

Target command Description
P Precedes the target
F Follows the target
R(n) Target range
RR Target range block

Using targets with prefix commands

The prefix commands are described in the rest of this chapter, along with command line commands, by functional group. Model 204 full-screen editor commands also provides a summary of full-screen editor commands.

P target command

Use the P target command to define a target above the line on which you enter the P. For example, to move a group of lines within a procedure to precede line 20, place a P target on the line 20 prefix.

F target command

Use the F target command to define a target below the line on which you enter the F. For example, if you wanted to move a group of lines within a procedure to follow line 20, place an F on the line 20 prefix.

Specifying range targets

Several commands let you include a range specification that indicates the range and direction of the target lines. The SAVE, LOCATE, and REPLACE commands define a set of target lines by including range specifications. For LOCATE, if one of these specifications is omitted, the full-screen editor processes the set of lines from the current line to the end of the procedure and then wraps to the top of the procedure and continues to the current line.

R(n) Target command

Use the R(n) target command to define a target in a range of n lines beginning with the line on which you enter the R(n). For example, if you entered R6 on line 15, the range begins on line 15 and ends with line 20.

RR Target command

Use the RR target command to define a target in a range of lines beginning with the line on which you enter the first RR and ending on the line on which you enter the second RR. For example, to specify a range from line 15 to 20, place one RR target on line 15 and another RR target on line 20.

Range target characters

Range specifications are summarized in the following table.

Range specifications

This specification... Has this effect...
ALL Begin at the procedure top and end at the procedure bottom; equivalent to TOP TO BOTTOM.
BOTTOM [TO] CURRENT Proceed backward through the procedure; begin at the bottom of the procedure and end at the current line.
BOTTOM [TO] TOP Proceed backward through the procedure; begin at the procedure bottom and end at the top of the procedure.
CURRENT [TO] BOTTOM

Begin at the beginning of the current line and end at the procedure bottom.

CURRENT [TO] TOP Proceed backward through the procedure; begin at the current line and end at the procedure's beginning.
RANGE If Rn is specified as a prefix target command, begin at the beginning of the line specified by Rn and end at the end of the line that is n 1 lines below the R line.

If RR is specified as a prefix target command, begin at the beginning of the line that contains the first RR and end at the line that contains the second RR.

TOP [TO] BOTTOM Begin at the procedure top and end at the procedure bottom; equivalent to ALL.
TOP [TO] CURRENT Begin at the top of the procedure; end at the bottom of the procedure.

Note: You can use the first initial of top, current, bottom, and range. For example, TOP TO CURRENT is the same as T TO C.

Clearing targets

Targets remain in effect until one of the following events occurs:

If you specify a target range, the full-screen editor does not automatically clear the range when the command completes; it preserves the range so that it can be used multiple times. To cancel a target range, enter a CLEAR command.

Prefix commands

Prefix commands and targets execute full-screen editor operations. A prefix command is an abbreviated command that specifies an editing operation to be performed on a particular line or set of lines.

Enter the command in the prefix area of the line that you want to change. For example, to delete a line, enter a D in the prefix area of the line and press Enter.

The prefix commands are described in the rest of this topic, along with command line commands, by functional group. Model 204 full-screen editor commands also provides a summary of full-screen editor commands.

Summary of prefix commands

The following table summarizes the prefix commands that you can enter in the prefix area of the display screen. Some prefix commands must be used with a target command. You can enter prefix characters in uppercase or lowercase and in any position in the prefix area.

Prefix commands

Command Meaning
E Extends the line by inserting a continuous line that contains blanks or nulls.
I* Enters input mode.
I[n] Inserts one or more lines containing blanks or nulls following this line.
"[n] Duplicates one or more lines.
""[n] Duplicates a block.
M[n] Moves one or more lines.
MM Moves a block.
C[n] Copies one or more lines.
CC Copies a block.
D[n] Deletes one or more lines.
DD Deletes a block.
U Restores the line(s) or block most recently deleted.
/ Makes this line the current line.

Clearing the prefix area

The CLEAR command performs the following operations:

  • Clears all prefix lines in the prefix or suffix area on the display screen.
  • Clears any display area text that has been typed since the last time you pressed Enter (or a PF key).
  • Aborts any pending prefix operations.
  • Cancels any specified targets .

For more information about prefixes and targets, see Using targets with prefix commands.

Pressing the CLEAR, PA1, or PA2 key on the 3270 terminal has the same effect as entering the CLEAR command.

Command-line commands

In addition to prefix commands, which you enter in the left-hand column (prefix area) of the line(s) you want to edit, the Model 204 full-screen editor provides several command-line commands.

Current line

Several command-line commands take effect from the current line. The current line is the line of the procedure on which the full-screen editor acts.

Use the set line prefix command (/) to set the current line.

Setting the current line

To define a new current line, type the set line command (/) in the prefix area of that line. This command is executed before any command-line commands specified on the same screen.

This feature is especially useful with the LOCATE command. For example, suppose that you want to locate the next occurrence of a string, but not the occurrence on the line following the current line (the line on which LOCATE would normally start its search). You can use the / prefix to reposition the current line so that LOCATE begins its search below the unwanted occurrence.

Where to enter command-line commands

Enter command-line commands on the third line down from the top of the screen, which is the command line. It has the following prompt:

===>

Entering commands

When entering command-line commands, follow these guidelines:

  • Enter one command at a time. Press Enter after the command. If you enter more than one command, only the first command is executed.
  • You can enter a command in uppercase or lowercase, or a combination of the two.
  • You can abbreviate some commands.
  • Several commands have defaults.

For more information on command abbreviations and defaults, see Model 204 full-screen editor commands.

Repeating commands

Placing an equal sign (=) on the command line repeats the most recently executed command.

This command executes a command any number of times and is useful for performing a repetitive operation, such as searching for a string, without re-entering the command each time.

You can also repeat a command by pressing PF9.

Moving around a procedure

The full-screen editor display commands move through a procedure and display needed portions of it on the screen. Display commands move the current line pointer and control the appearance of portions of the procedure, but they do not change the contents of the procedure itself.

Display commands are summarized in the following table and are discussed in detail in the sections that follow.

Display commands

Command Meaning
TOP Scrolls to the first line of the procedure.
BOTTOM Scrolls to the last line of the procedure.
FORWARD [n] Scrolls forward a specified number of screens in the procedure.
BACKWARD [n] Scrolls backward a specified number of screens in the procedure.
+n Scrolls forward a specified number of lines in the procedure.
-n Scrolls backward a specified number of lines in the procedure.

Moving to the top of the procedure (TOP)

The TOP command moves the line pointer to the first line of the procedure that is being edited. After you issue a TOP command, the full-screen editor displays the TOP OF PROCEDURE indicator on the first line of the display area. It displays the first line of the procedure on the second line. The remaining lines of the procedure appear on subsequent lines. The first line of the procedure becomes the current line and is highlighted in the display.

The TOP command is helpful when inserting a line or set of lines at the beginning of the procedure. In a procedure that fills many screens; using the TOP command is often more efficient than scrolling backward using the BACKWARD command.

Moving to the bottom of the procedure (BOTTOM)

The BOTTOM command moves the line pointer to the last line of the procedure that is being edited. After you issue a BOTTOM command, the full-screen editor displays the BOTTOM OF PROCEDURE indicator on the last line of the screen. The preceding lines of the procedure appear on the preceding lines of the screen. The last line of the procedure becomes the current line and is highlighted in the display.

The BOTTOM command is helpful when adding a line or set of lines to the end of the procedure. In a procedure that fills many screens, using the BOTTOM command is often more efficient than scrolling forward using the FORWARD command.

Scrolling forward (FORWARD)

The FORWARD command scrolls forward in the procedure by moving the line pointer down a specified number of screens. The format of the FORWARD command is as follows:

Syntax

FORWARD[n]

If you enter FORWARD, the full-screen editor advances one entire screen. If you enter FORWARD followed by a number (n), the full-screen editor advances the specified number of screens.

After you issue a FORWARD command, the new current line is displayed highlighted at the center of the screen. The remainder of the screen is filled with as many as possible of the lines preceding and following the current line. The bottom line of the previous screen display becomes the top line of the new screen display.

If the current line is the first line of the procedure when you issue the FORWARD command (that is, you are positioned at the top of the procedure), the full-screen editor advances only one half a screen and displays the new current line in the center of the display screen.

You can also press PF8 to scroll forward.

Scrolling backward (BACKWARD)

The BACKWARD command scrolls backward in the procedure, moving the line pointer up a specified number of screens. The format of the BACKWARD command is as follows:

Syntax

BACKWARD[n]

If you enter BACKWARD, the full-screen editor scrolls backward one entire screen. If you enter BACKWARD followed by a number (n), the full-screen editor scrolls backward the specified number of screens.

After you issue a BACKWARD command, the new current line is displayed highlighted at the center of the screen. The remainder of the screen is filled with as many as possible of the lines that precede and follow the current line.

If the current line is the last line of the procedure when the BACKWARD command is issued, the full-screen editor scrolls backward only half a screen and displays the new current line in the center of the display screen. Otherwise, the BACKWARD command causes the top line of the previous screen display to become the bottom line of the new screen display. In either case, the BACKWARD command causes the current line to be backed up by the specified number of screens.

You can also press PF7 to scroll backward.

Scrolling a specified number of lines (+/-n)

The scroll commands (+n and -n) scroll forward or backward, moving the line pointer a specified number of lines in the procedure. These commands are useful for moving a portion of the procedure up or down.

If you enter a number, optionally preceded by (+), the full-screen editor advances the specified number of lines. For example, if you enter either 5 or +5 the editor advances the current line forward five lines toward the end of the procedure and adjusts the display on the screen.

If you enter -, followed by a number, the editor moves backward the specified number of lines. For example, if you enter -10, the editor moves backward 10 lines toward the beginning of the procedure and adjusts the display on the screen.

In general, the current line is displayed highlighted at the center of the screen. However, if the current line is less than half a screen from the top or bottom of the screen when you issue the command, the full-screen editor shifts the display to fill the screen.

Note that +n and -n scroll a specified number of lines in the procedure. Because a single procedure line can occupy more than a single physical line on the display screen, these commands might actually appear to scroll forward or backward a greater number of display lines than specified.

Searching for and replacing text

The full-screen editor LOCATE command allows you to search for text strings in a procedure.

The REPLACE command allows you to locate and change text strings.

These two commands share many characteristics, including:

  • Rules for text string searches
  • Use of special search characters
  • Option to specify a range of procedure lines

Uppercase and lowercase in searches

With the exception of the following special search characters, the full-screen editor searches for an exact match to the string specified in the LOCATE command. The case (upper and lower) in which the string is specified and the placement of blanks are significant. Therefore, if you specify the command,

LOCATE /Model 204

the editor locates an occurrence of Model 204, but not MODEL 204 or MODEL204 in the procedure.

Note that although lowercase characters are entered in a procedure, Model 204 does not necessarily process these characters as lowercase. Unless the Model 204 command, *LOWER, was specified before entering the full-screen editor, characters are translated automatically into uppercase when they are transmitted to Model 204. For additional information about using uppercase and lowercase characters, refer to the *UPPER and *LOWER commands in the Model 204 documentation wiki.

Specifying a range

You can limit the scope of a text string search by indicating a range.

The range entry indicates the target lines and the order of the lines to be searched for a match. You can include any of the range specifications summarized in Specifying range targets. If you omit the range, the full-screen editor searches the current line.

Special search characters

You can use special search characters when specifying a search string with the LOCATE and REPLACE commands.

These special characters are:

  • Arbitrary (wildcard) character
  • Repeat character
  • End-of-line character

Wildcard character

An arbitrary or wildcard character is matched by any character. For example, the ampersand character (&) is your wildcard character, and you specify the following search string:

MODEL&

The following strings in the procedure can be located:

MODELA MODEL2 MODEL&

Setting the wildcard character (ARBCHAR)

The ARBCHAR command specifies a wildcard character that matches zero or more characters when it is included in a search string. The format of the ARBCHAR command is as follows:

Syntax

[SET] ARBCHAR {OFF | char}

where char represents the wildcard or arbitrary character.

ARBCHAR OFF is the default.

Suppose that you specify:

ARBCHAR *

Then you use the asterisk in the LOCATE command:

LOCATE /PROC*

The full-screen editor searches for strings that contain the letters PROC, followed by any character. The following strings are found:

PROCA INPROC3 PROC *.

The following strings are not found:

PRO12 PRO CABC

To turn off the wildcard character capability, enter:

ARBCHAR OFF

If you enter ARBCHAR OFF, none of the characters in the specified search strings in subsequent LOCATE and REPLACE commands are considered wildcard characters, and all strings in the procedure must match the search string exactly.

Repeat character

The repeat character indicates that the previous character in the string can be repeated any number of times. For example, your repeat character is an exclamation point (!), and you specify the following search string:

Format *!

Any of the following strings in the procedure are located:

Format * Format ** Format ****************

Setting the repeat character (REPEAT)

The REPEAT command specifies a repeat character that matches zero or more occurrences of the repeating character when it is included in a search string.

Syntax

The format of the REPEAT command is as follows:

[SET] REPEAT {OFF | char}

Where char represents the repeat character.

REPEAT OFF is the default.

Suppose that you specify:

REPEAT &

Then you use the & in the LOCATE command:

LOCATE /MODEL*&

The full-screen editor searches for strings that contain the characters M O D E L, followed by any number of asterisks. The following strings are selected:

MODEL* MODEL*** MODEL**

The following strings are not selected:

MODEL1 MOD*** MODEL *

You can use repeat characters in conjunction with wildcard characters. For example, suppose that the wildcard character is an exclamation point (!), the repeat character is an ampersand (&), and you specify the following search string:

/PRE!&

The full-screen editor locates any string that begins with the letters P R E, followed by any number of any other characters.

To turn off the repeat character capability, enter:

REPEAT OFF

If you enter REPEAT OFF, none of the characters in the specified search strings in subsequent LOCATE or REPLACE commands are considered repeat characters.

End-of-line character

The end-of-line character indicates the end of one line and the beginning of the next line. When the end-of-line character is used in a search string, it specifies a search for a string that occurs at the beginning or end of a line. For example, the percent sign (%) is your end-of-line character, and you specify the following search string:

%prefix

Any line beginning with the word prefix is located:

prefix area!!! prefixes!!! prefix 12!!!

The percent sign (%) is your end-of-line character, and you specify the following search string:

prefix%

Any line ending with the word prefix is located.

Specify an end-of-line character only at the beginning or at the end of the search string.

Setting the end-of-line character

The LINEND command specifies an end-of-line character. When you use an end-of-line character in a search string, it represents a character that indicates the end of one line and the beginning of the next line. The editor searches for a string that occurs at the beginning or end of a line.

Syntax

The format of the LINEND command is as follows:

[SET] LINEND {OFF | char}

Where char represents the end-of-line character.

LINEND OFF is the default.

Suppose that you specify:

LINEND #

Then you use the pound sign (#) in a search string:

LOCATE /#PART

The full-screen editor locates any line that begins with the letters P A R T.

You must specify the end-of-line character at the start or end of a search string.

To turn off the end-of-line character capability, enter:

LINEND OFF

If you enter LINEND OFF, none of the characters in the search strings specified in subsequent LOCATE or REPLACE commands are considered end-of-line characters.

Combining special search characters

You can specify combinations of characters in the search string. For example, the following search string locates any string that contains HELP, followed by any number of characters, followed by ME:

HELP&!ME

For example:

HELP123ABME HELP ME

Searching for a string (LOCATE)

The LOCATE command searches for a particular string in the procedure or in a subset of the procedure. See Specifying a string for more information about string specifications.

Two formats of the LOCATE command

There are two formats of the LOCATE command.

With LOCATE keyword

The first format is as follows:

[-][LOCATE] /string[/ [IN]range]

Where the delimiting character (/ in the example above) can be any character not appearing in the string, with the exception of a blank character.

For example:

LO *ELEPHANT* IN CURRENT TO TOP

If you do not specify a range, you do not need to include a delimiter after the string. If you specify an alphabetic delimiter, include a space between the LOCATE or LO keyword and the delimiter. If the delimiter is nonalphabetic, the space is not required.

See Specifying range targets for more information about using a range. See Range target characters for a list of range specifications.

Without LOCATE keyword

The second format, which does not require the LOCATE keyword, is as follows:

[-] /string

where a slash (/) must precede the string. If you do not specify a range, you do not need to include a slash following the string.

If the full-screen editor cannot find a match for the specified string, it displays the following message:

TARGET STRING NOT LOCATED

Searching forward

To search forward, enter one of the following formats:

LOCATE /string[/ [IN] range]

/string

The full-screen editor starts the search at the line following the current line and advances forward, stopping when it locates the string or reaches the end of the procedure. If the current line is the last line of the procedure, the full-screen editor wraps to the top of the procedure, begins the search at the top of the procedure, and ends at the current line.

Searching backward

To search backward, enter one of the following formats:

-LOCATE /string[/ [IN] range]

-/string

When you precede the command with a minus sign, the full-screen editor starts the search at the line preceding the current line and searches backward toward the beginning of the procedure, stopping when it locates the string or reaches the top of the procedure. If the current line is the top of the procedure, the full-screen editor wraps to the bottom of the procedure, begins the search at the bottom line, and ends at the current line.

Replacing a string (REPLACE)

The REPLACE command replaces a string in the procedure with a substitute string. REPLACE provides the following capabilities:

  • Displays each target string to verify the change before proceeding.
  • Changes more than one occurrence of a specified string in a single line.

The format of the REPLACE command is as follows:

Syntax

REPLACE/string1/string2 [n | *] [VERIFY [IN] range]

If you include the n, VERIFY, or range options in the REPLACE command, specify the options in the order shown.

For example:

R /GROUP/PERM GROUP/ * IN CURRENT TO TOP

Specifying a string

Specify strings as follows:

string1 String to be searched for and changed (old string).
string2 New string to replace string1. The new string need not be the same length as the old string.

You can use as a delimiter any nonblank character (/ in the example above) that does not appear in string1 or string2. If you do not specify the number of occurrences, a VERIFY option, or a range, you do not need to include a delimiter after string2.

Controlling the number of strings to be replaced

You can replace all occurrences of a string or only the first occurrence in a line. The n specification in the REPLACE command represents the number of occurrences of the search string (string1) to be replaced in each line. If you omit an n specification, only the first occurrence of the string is replaced in a line.

If you specify a value of *, all occurrences of the string are replaced in each line.

Using the VERIFY option

The VERIFY option verifies all string replacements before they are made. Each line that contains a string that matches the specified string is highlighted and is delimited on the scale line by the characters of the proper length, on the column scale line directly beneath the potential match. For example:

<====>

The column scale must be turned on to display the scale line characters. The following prompt appears on the command line each time a string is matched:

CHANGE?

Respond with any of the following choices:

This choice... Performs this action...
YES, Y, or Enter Changes the string
NO or N Does not change the string
ALL Turns off the VERIFY option and makes all remaining changes
STOP or S Terminates the REPLACE command

If you enter any other response, the full-screen editor displays the CHANGE? prompt again.

Specifying a range

You can specify a range of procedure lines to which the search applies. See Specifying range targets for more information about using a range. See Range target characters for a list of range specifications.

Inserting text

You can insert text several ways using the full-screen editor. Use the following commands to insert text:

This command... Performs this action...
E Extends a line
I Inserts separate lines
I* Enters input mode
GET Inserts a saved procedure

You can also insert text using the REPLACE command to substitute a string with additional text for an existing string (see Specifying a string).

Alternatively, you can insert text by duplicating, copying, and moving lines or blocks of text.

Extending a line

The E (extend) prefix command inserts a physical line immediately following the line that contains the E, forming a logical line extension. The line is filled with the fill character (that is, blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see Specifying a fill character.

Inserting lines

The I (insert) prefix command inserts one or more lines following the line containing the I. Unlike E lines, these lines are treated as separate lines, not as continuations of existing lines in the procedure.

The format of the I prefix command is:

Syntax

I[n]

If you enter I alone, the full-screen editor inserts one line following the line containing the I. If you enter I followed by a number, the full-screen editor inserts the specified number of lines. For example, I5 inserts 5 blank lines after the line that contains the command.

Inserted lines are filled with the fill character (blanks or nulls) specified in the FILL command. For more information about the FILL command and fill characters, see Specifying a fill charcter.

Specifying a fill character

The FILL command specifies a fill character. When the full-screen editor displays a line of text, it pads the line on the right with either null or blank characters. The format of the FILL command is as follows:

Syntax

[SET] FILL {NULL | BLANK}

If you specify FILL NULL, the full-screen editor pads with null characters on the right. If you specify FILL BLANK, the full-screen editor pads with blank characters on the right.

The character selected as the fill character is inserted in lines generated using the E (extend) and I (insert) prefix commands.

Note: The command line on the display screen is always filled with null characters, regardless of the specified fill character.

Entering input mode

The I* prefix command places the full-screen editor in input mode. The line that contains I* becomes the current line and appears at the top of the screen. The rest of the screen is blank. Any lines following the I* line in the original procedure are not displayed.

For input lines, the cursor appears in column 1 of the first blank line. You can now enter text. If you press Enter, the last line that you typed is moved to the top of the screen and the cursor appears on the next (blank) line. To exit from input mode, either press Enter twice without any intervening text editing, or enter any full-screen editor command on the command line.

Inserting a saved procedure

The GET command inserts a previously saved procedure after the current line. You can insert a procedure that is stored in either the default procedure file or in a file specified in the command (with the filespec option). The last line of the inserted procedure becomes the current line and is positioned at the center of the display screen.

Before you issue the GET command, position the cursor at the appropriate line. For example, if you want to add one procedure to the end of another, use the BOTTOM command to advance the cursor to the end of the procedure before the procedure is added.

Syntax

The format of the GET command is:

[IN filespec] GET procname

Where:

  • filespec is the name of the procedure file in which the combined procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group.

    The format for filespec is:

    [[{PERM | TEMP} GROUP] | FILE] name

    For example:

    FILE PAYROLL TEMP GROUP EMPINFO ACCOUNT

    If neither FILE nor GROUP is specified, FILE is the default.

  • procname is the name of the procedure to be inserted after the current line. This procedure can be stored in any Model 204 file that you currently have open.

Duplicating, copying, and moving text

You can save keystrokes and reorganize text by using the full-screen editor commands for the following tasks:

  • Duplicating lines of text (" or "")
  • Copying lines of text (C or CC)
  • Moving lines of text (M or MM)

Groups of lines are also referred to as blocks. You can also delete and undelete lines of text.

Duplicating lines or blocks

You can duplicate either one line or a block of lines.

Duplicating one or more lines

The duplicate (") prefix command duplicates the line on which it is entered. The format of the duplicate command is as follows:

"[n]

Where n is the number of copies. If you enter ", the full-screen editor inserts one copy of the line. If you enter " followed by a number, the full-screen editor inserts the specified number of duplicate lines. For example, "5 duplicates a line five times.

Duplicating a block of text

The duplicate block ("") prefix command duplicates a group of lines. Entering "" duplicates the block of lines beginning with the line on which the first "" is specified and ending with the line on which the second "" is specified. The format of this command is as follows:

""[n]

Where n is the number of copies. If you enter "", the full-screen editor inserts one copy of the block of lines. The block appears immediately following the line that contains the second "" (the last line of the block). If you enter "" followed by a number, the full-screen editor duplicates the block the specified number of times.

Copying lines or blocks

The C (copy) prefix command copies one or more lines to the position indicated by the P (precedes) or F (follows) prefix target. If you specify P, the line(s) are inserted just before the line that contains the P. If you specify F, the lines are inserted just after the line that contains the F. For more information about prefix targets, see Using targets with prefix commands.

The format of the C prefix command is as follows:

C[n]

Where n is the number of lines to copy. If you enter C, the full-screen editor copies only the line that contains the C. If you enter C followed by a number, the full-screen editor copies the specified number of lines, beginning with the line containing the Cn. When a line is copied, it is preserved in its original position as well as being duplicated in the new position.

The CC (copy block) prefix command copies a group of lines without requiring you to count them. CC copies the block of lines that begins with the line on which the first CC is specified and that ends with the line on which the second CC is specified. The lines are copied to the position indicated by the P (precedes) or F (follows) prefix target, as discussed for C.

Moving lines or blocks

The M (move) prefix command moves one or more lines to the position indicated by the P (precedes) or F (follows) prefix target. If you specify P, the line(s) are inserted just before the line containing the P. If you specify F, the line(s) are inserted just after the line that contains the F.

The format of the M prefix command is as follows:

M[n]

Where n is the number of lines to move. If you enter M, the full-screen editor moves only the line that contains the M. If you enter M followed by a number, the full-screen editor moves the specified number of lines, beginning with the line that contains the Mn. When a line is moved, it is automatically deleted from its original position.

The MM (move block) prefix command moves a group of lines without requiring you to count them. MM moves the block of lines that begins with the line on which the first MM is specified and that ends with the line on which the second MM is specified. The lines are moved to the position indicated by the P (precedes) or F (follows) prefix target.

Deleting and undeleting text

You can delete lines from a procedure, using the D or DD prefix commands. You can also retrieve the last entry that was deleted with the U prefix command. Groups of lines are also referred to as blocks.

Deleting lines or blocks

The D (delete) prefix command deletes one or more lines from the procedure. The format of the D prefix command is as follows:

D[n]

Where n is the number of lines to delete. If you enter D, the full-screen editor deletes only the line that contains the D. If you enter D followed by a number, the full-screen editor deletes the specified number of lines, beginning with the line that contains the D. If the number of lines specified in the D command exceeds the number remaining in the procedure, the full-screen editor deletes all lines from the line on which the D command is specified to the end of the procedure.

When a line or set of lines is deleted, the lines are not immediately discarded; they are placed on the full-screen editor delete stack. Entries in this stack are deleted when the editing session is terminated. Each time a D command is executed, an entry is placed on the delete stack. A Dn command, which deletes several lines, causes a single entry that contains the specified block of lines to be placed on the stack. However, a series of contiguous lines, each containing a D command, is not accumulated into a single entry on the delete stack. You can retrieve or undelete an entry by means of the U command.

The DD (delete block) prefix command deletes a group of lines without requiring you to count them. DD deletes the block of lines that begins with the line on which the first DD is specified and that ends with the line on which the second DD is specified. The block is placed on the delete stack as a single entity.

Undeleting lines or blocks

The U (undelete) prefix command retrieves the last entry that was deleted (that is, placed on the delete stack) and inserts it after the line that contains the U.

Exiting from the full-screen editor

To exit from the full-screen editor or to save edited procedures, use the commands listed in the following table, which also lists the description of each command and where more information is located. When you exit from the full-screen editor, you are returned to the Model 204 command level.

Exit and save commands
This command... Performs this action...
END Exits from the full-screen editor and saves the edited procedures.
GO

Exits from the full-screen editor, saves the edited procedure, and includes (executes) the edited procedure.

QUIT Exits from the full-screen editor, might prompt if changes were made to the procedure, and does not save the edited procedure.
SAVE Does not exit from the full-screen editor, but saves the edited procedure.

For more information about exit and save commands, refer to the EDIT command.

Exiting from the editor and saving the procedure (END)

The END command exits from the full-screen editor and saves the edited procedure on disk. Specify the name under which the procedure is to be saved. You can store the procedure in either the default procedure file or in a file specified in the command.

The format of the END command is as follows:

[IN filespec] END [procname]

Where:

  • filespec is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the default Model 204 procedure file. The filespec can identify a Model 204 file or a temporary or permanent group. The file specified by IN filespec must be open.

    The format of filespec is:

    [[{PERM | TEMP} GROUP] | FILE] name

    For example:

    FILE PAYROLL TEMP GROUP EMPINFO

    If you do not specify either FILE or GROUP, FILE is assumed. For more information about files and groups, see the following pages:

  • procname is the name under which the edited procedure is to be saved.

If you enter END, the procedure is saved under the name of the output procedure specified when you invoked the editor. The procedure is stored in the Model 204 default procedure file.

Saving and including the procedure (GO)

Like the END command, the GO command exits from the full-screen editor and saves the edited procedure. Unlike END, GO automatically performs an implicit Model 204 INCLUDE command, which executes the Model 204 commands in the saved procedure.

The format of the GO command is as follows:

[IN filespec] GO [procname]

GO command options are identical to END command options. If you enter GO, the full-screen editor saves the procedure under the name of the output procedure specified when you invoked the full-screen editor. The procedure is stored in the Model 204 default procedure file.

Exiting from the editor without saving the edited procedure (QUIT)

The QUIT command exits from the full-screen editor.

The syntax is as follows:

QUIT

If you change the procedure during the current editing session and exit by entering QUIT, the full-screen editor displays the following message, which indicates that the procedure was changed and requests that you to enter QUIT again, if you want to exit the procedure without saving the edits:

PROCEDURE HAS BEEN MODIFIED, ENTER 'QUIT' TO VERIFY.

Respond in one of the following ways:

  • Enter QUIT on the command line to confirm that changes are not to be saved.
  • Ignore the prompt and continue editing.

To exit without receiving the warning prompt, enter the following command:

QUIT QUIT

If you use QUIT to exit from a file that was examined but not modified, the full-screen editor does not prompt before exiting.

You can also press PF3 to quit. Your edits are not saved.

Saving the procedure (SAVE)

The SAVE command saves the edited procedure or a subset of that procedure under the specified name ( procname) or the default procedure name. Unlike the END, GO, and QUIT commands, SAVE does not exit from the editor. To ensure against the loss of changes due to a system failure, issue the SAVE command periodically while you edit a procedure.

The format of the SAVE command is as follows:

[IN filespec] SAVE [procname | procname] [[IN] range]

Where:

  • filespec is the name of the procedure file in which the edited procedure is to be stored. This file is used in place of the Model 204 default procedure file. The filespec can identify a Model 204 file or a temporary or permanent group. The file specified with IN filespec must be open. It has the same syntax as described for the END command.
  • procname is the name under which the edited procedure is to be saved.
  • range is the range to be saved. Note that if you specify range, you must also specify procname. You can include any of the range specifications. If you omit a range, the entire procedure is saved.

If you enter SAVE alone, the full-screen editor saves the entire procedure under the name of the output procedure specified when the editor was invoked. The procedure is stored in the Model 204 default procedure file.