Model 204 full-screen editor
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 Sample display screen. The areas numbered in the diagram are described below the diagram.
Sample Display Screen
figure 1-1 goes here
Screen components
The components of the display screen are:
- 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
- Message Line
The second line is reserved for error and status messages.
- 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.
- 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.
- 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.
- 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 (/).
- 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.
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:
- Commands that use the targets complete execution.
- CLEAR command is executed (see Clearing the prefix area).
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.
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.
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.
The format of the REPEAT command is as follows:
Syntax
[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 MODEL, 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 (!) and the repeat character is and ampersand (&) and you specify the following search string:
/PRE!&
The full-screen editor locates any string that begins with the letters PRE, 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.
The format of the LINEND command is as follows:
Syntax
[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 PART.
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:
Syntax
[-][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:
Syntax
[-] /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 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.
The format of the GET command is:
Syntax
[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:
Syntax
"[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:
Syntax
""[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:
Syntax
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:
Syntax
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:
Syntax
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.
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:
Syntax
[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 Model 204 documentation wiki 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:
Syntax
[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:
Syntax
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:
Syntax
[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.