Management Commands [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation
HP EDIT Reference Manual
Management Commands
Management commands enable you to manage your file and your session by
performing a variety of functions, ranging from texting in a new file to
exiting HP EDIT. In addition, some of the management commands provide the
special functions of assigning keys to commands and encrypting text for
file security.
File Management
Commands in this category enable you to perform special functions within
a file not directly related to text editing. File management functions
and their associated commands are as follows:
* Displaying or modifying the configuration
Set Options
Save Config File
Load Config File
Show Editor Statistics
* Managing files
Text File
Join File
Keep Text
Change Filename
Insert Filename
Change Filename From Text
* Displaying editing and configuration information
Show Editor Statistics
Show Key Assignment
Show All Key Assignments
Show Reassigned Keys
Show Macros
* Using multiple windows
Open Window
Size Window
Close Window
* Editing line numbers
Edit Line Number
Renumber Lines
* Refreshing text
Refresh Line
Refresh Screen
* Time stamping text
Insert Date
* Exiting HP EDIT
Exit
Displaying Or Modifying The Configuration.
When you initiate an editing session, HP EDIT reads in an editing
environment from the default configuration file in your logon group
called EDCONFIG. You can retain this environment during your session, or
you can display and change many of the elements in the editing
environment by using the Set Options command. When you execute this
command, a separate screen appears that displays the current editing
parameter settings. You can change one or more of these settings
temporarily or permanently. If you do not save these settings before you
exit the session, editing parameter changes are automatically discarded
and the editing parameters revert to default values.
If you want to save changed editing parameter settings, you execute the
Save Config File command and either save the changes to the default
EDCONFIG file or to another file. If you save the changes to another
file, you must load the file in subsequent sessions using the Load Config
File command so that HP EDIT can read in your customized editing
environment. If you save the changes to the EDCONFIG file, however, HP
EDIT automatically reads in this file when you start a new session,
eliminating the need for you to manually read in the configuration.
Besides changed editing parameter settings, your customized configuration
can also include keys that you have assigned to commands as well as
macros. Refer to "Customizing The Editing Environment" in chapter 2 for
information about configuring assigned keys and macros.
HP EDIT provides an additional command, called Show Editor Statistics,
which displays a screen showing current status information for selected
HP EDIT variables. Unlike the Set Options command, the values of these
variables are unalterable from this screen.
Managing Files.
You can instruct HP EDIT to read in another file from the current session
by executing the Text File command. If the requested file does not
exist, HP EDIT creates the file. If you made changes and saved the
current file before executing this command, HP EDIT concludes the current
session and reads in the specified file.
You can use the Join File command to copy the contents of another file
into a new or existing file. When you execute the command, HP EDIT
inserts the contents of the named file above the current cursor position.
After you have finished editing, you can execute the Keep Text command to
save text changes. You can also execute this command any time during
your session to update the existing file with your changes. By default,
HP EDIT saves the text to the current file name unless you instruct it to
do otherwise. You can alternatively save the file contents to an
existing or new file. You can either specify a different file name when
prompted by the Keep Text command, or you can specify a different name
using the Change Filename command and then execute the Keep Text command.
Both methods can save your text to a newly created file so that the
original file remains intact and unchanged.
You can also edit the current file name by first executing the Insert
Filename command to insert the current file name into the text. After
editing the file name, you can execute the Change Filename From Text
command to replace the current file with the new one.
Displaying Editing And Configuration Information.
During your session, you may want to display pertinent configuration or
session information. You can use the Show Editor Statistics command to
display status information on the current editing session, such as the
file name and size, mark settings, and current search and replace
patterns. Similarly, you can use the Set Options command to show the
current status of alterable editing parameters.
You can display currently assigned keys as well as keys that you have
reassigned. The Show Key Assignment command displays the definition of
one specified single or prefixed key. The Show All Key Assignments
command displays definitions for all single or prefixed keys. The Show
Reassigned Keys command displays all single and prefixed keys that you
have assigned to non-default commands and the associated names of the new
commands.
You can display the names of all currently defined macros and the
associated macro text by executing the Show Macros command. The command
also shows whether the macros displayed are preemptive or non-preemptive.
Refer to the Define Macro command in chapter 4 for the definition of a
preemptive and non-preemptive macro.
Using Multiple Windows.
During editing, you may want to compare the text of two different
portions of your file, or you may want to move text from one area to
another. The Open Window command enables you to edit two portions of
your file simultaneously without having to scroll between them. When you
execute this command, HP EDIT divides the screen into two windows so you
can access different portions of your file at the same time. HP EDIT
converts the current cursor line into a boundary line. Text-altering
changes made within one window are reflected in the other. [REV BEG]Use
the arrow keys to move between the two windows.[REV END]
If you want to change the window sizes after you execute the Open Window
command, you can adjust them with the Size Window command. You can
adjust the size of a window by executing the command preceded by a count
from the window that you want to enlarge or reduce. You can enlarge a
window to consume the remainder of the screen by moving to the window and
executing the Size Window command without specifying a count.
[REV BEG]
You can set the Forward/Back Scroll Size and Left/Right Scroll Size
options independently for each window.[REV END]
To revert to a single window screen, execute the Close Window command.
[REV BEG]
Viewing Multiple Files.
You can use multiple windows to view two different files simultaneously.
Use the Open Window command, move the cursor to the window you want the
different file in, and use the Text File command to call in a different
file. To move between the two windows use the arrow keys.
If you want to have both windows show the same file again, use the Text
File command and specify the filename in the other window.
Viewing multiple files is useful when you want to view a version of a
file with unsaved changes on the same screen as the version that is on
the disk. To do this, rename the changed version with either the Keep
File or the Change Filename command.
When editing two different files in two windows, you can set some options
independently for each window. The options you can set independently
are:
* auto indent
* automatic bumping
* display line numbers
* renumber lines
* auto keep interval
* right margin
* shift count
* keep file type
* word category
* lines per page
* output device
* print line numbers
* print header lines
When editing the same file in two different windows, you can set the
following options independently for each window:
* Forward/Back Scroll Size
* Left/Right Scroll Size
The following list of options are global and apply to both windows in an
editing process.
* capitalize input
* delete control chars
* highlight match
* ignore case
* pattern matching chars
* use function keys
* text entry exit
* file path
* tab spacing
* new file type
In addition to the global options listed above, search and replace
patterns, macros, and key assignments are global as well.
If you would like to hide one of the windows, execute the Close Window
command with the cursor in the file you want to hide. The hidden window
and file disappear from the screen, but HP EDIT maintains its command
history and file-specific options. The hidden window and file will
reappear when you execute the Open Window command. The hidden window and
file will also reappear when you execute the Close Window command in the
window and file remaining on the screen. In this way you can switch
easily between the two files because they are both still active.
When you want to save a file, the Keep File command only saves the file
on the screen. The Exit command applies to both windows, hidden and
visible. If you try to exit without saving both files, HP EDIT will ask
you if you want to save all changes before exiting.[REV END]
Editing Line Numbers.
HP EDIT enables you to renumber one line or several lines of numbered
files. Before you renumber one or more lines, you should first enable
the Display Line Numbers parameter from the Set Options screen if line
numbers are not already displayed.
To renumber a single line number, you move the cursor to the line whose
number is to be changed, then execute the Edit Line Number command. HP
EDIT clears the number from the screen. You can replace it with another
number as long as the new number does not conflict with the ascending
order of adjacent line numbers.
To renumber a range of lines, you execute the Renumber Lines command and
specify the range by responding to the prompts. This command similarly
requires that you preserve the ascending line number order.
Refreshing Text.
During your editing session, the MPE command interpreter may print a
message to your terminal that appears to have altered the text, or data
communications interference can produce garbled characters that also may
appear to have altered your text.
HP EDIT provides two commands that restore your display to its previous
state before it was visibly altered. You can execute the Refresh Line
command from the current line to restore the line to its previous state,
and you can execute the Refresh Screen command to restore the entire
screen to its previous state.
Time Stamping Text.
You may want to insert a time stamp within your text for future
reference. To insert the current date and time, execute the Insert Date
command. When you execute the command, HP EDIT inserts the day of the
week, calendar date, and time on a line above the current cursor
position.
Exiting HP EDIT.
After you have finished editing and have saved the file, you can either
text in another file or you can conclude the editing session using the
Exit command. If you did not save text changes before executing this
command, HP EDIT asks you whether you want to discard the changed text.
You must respond to this prompt before HP EDIT allows you to exit the
session. If you do not indicate that you want to discard changes, HP
EDIT returns you to the editing session where you must save your changes
before exiting.
Session Management
Commands in this category enable you to perform special functions within
the current editing session that are independent of the current editing
file. Session management functions and their associated commands are as
follows:
* Obtaining help
Help
Describe
* Activating processes
Activate Next Process
Activate Previous Process
* Running foreground or background tasks
Break To MPE
Execute MPE Command
Run TDP Formatter
Run Program
Start/Stop Timers
Obtaining Help.
HP EDIT provides a comprehensive help system that offers useful
information about commands and their usage. You can access this system
by executing the Help command. When the main help screen appears, you
can choose from the following categories:
* Commands by Topic
* Command Summary
* Command Description
You can also use the Describe command to directly access the command
description portion of the help system without having to access the main
help screen.
Activating Processes.
While editing a particular file, you may want to work on another file
without concluding the current editing session, or you might want to cut
text from the current file and paste it to another file. You can
temporarily leave the current file and read in another file by executing
the Activate Next Process command. The new editing session is a child
process of the current editing session. When you want to return to the
original file, which is the parent session, you can execute the Activate
Previous Process command. This command does not terminate the child
session. You can return to it by executing the Activate Next Process
command again.
These commands enable you to work on several files simultaneously. Each
time you execute the Activate Next Process command at the end of the
process chain, the current session becomes a parent session to a newly
activated child. If you create multiple sessions with this command, you
can execute the Activate Previous Process command repeatedly until you
have reached the original parent session.
Running Background Or Foreground Tasks.
During your session, you may need to temporarily suspend editing to
execute commands that perform background or foreground tasks. For
instance, if you want to access the MPE command interpreter without
concluding your session, you can either issue Execute MPE Command or the
Break To MPE command.
Execute MPE Command enables you to execute MPE commands that can be
executed programatically using the COMMAND intrinsic. (Refer to the
"Executing Commands Programatically" section of the MPE Intrinsics
Reference Manual.) The Break To MPE command enables you to execute
non-program MPE commands. (Refer to the "Interrupting Command Execution"
section of the MPE Commands Reference Manual.)
The Run Program command enables you to run other programs that perform
various functions, such as compiling and executing code from within HP
EDIT. You can specify whether you want to run the program as a background
or foreground job. HP EDIT can also use the TDP formatter for document
preparation if it is available on your system. If you have incorporated
TDP formatting commands in your text file, you can execute the Run TDP
Formatter command to format your text and send it to a printer or output
file.
You can use the Start/Stop Timers command to log CPU and clock time.
When you initially execute the command, HP EDIT begins counting time.
When you execute the command again, HP EDIT displays the elapsed CPU time
and clock time while restarting the timers. The timers do not log CPU
time consumed in MPE after executing the Break To MPE command.
Key Management
Commands in this category enable you to execute prefixed commands or
commands by name, assign keys to commands that currently have none,
provide alternate key assignments for commands to which default keys are
assigned, display one or more key assignments, or return one or all keys
to their default assignments.
Key management functions and their associated commands are as follows:
* Executing unassigned or prefixed commands
Execute Editor Command
Meta
* Assigning or reassigning an individual key
Assign Key
* Displaying current key assignments
Show Key Assignment
Show All Key Assignments
Insert All Key Assignments
Show Reassigned Keys
* Returning keys to their default assignments
Reset Key Assignment
Reset All Key Assignments
Executing Unassigned Or Prefixed Commands.
You can execute most HP EDIT commands by pressing an assigned key or
sequence of keys. A default set of keys is assigned to the frequently
used commands. Less frequently used commands have no default key
assignment. In order to execute commands by name rather than key
assignment, HP EDIT provides a command called Execute Editor Command.
Rather than pressing a single or prefixed key to execute an assigned
command, you press the key assigned to Execute Editor Command. You then
respond to the HP EDIT prompt by typing the name of the command you want
to execute. You can execute any HP EDIT command using this manual
approach.
To extend HP EDIT key assignment capacity, many of the assigned keys are
prefixed by a pseudo command called Meta. This command is always used as
a key preceding another assigned key. Prefixed commands are those in
which the Meta key precedes the assigned key or keys. The Meta key is
assigned by default to the ESC and $ keys, but you can assign the Meta
function to additional keys like any other HP EDIT command.
Assigning Or Reassigning An Individual Key.
You can assign keys to commands that do not currently have assigned keys,
or you can reassign one or more default keys to other commands.
You use the Assign Key command to assign a non-numeric key to any HP EDIT
command. Since the keyboard consists of a limited number of keys,
additional key assignments are possible by using control and Meta
sequences. Consequently, you can assign a single key to a command or a
single key pressed in conjunction with the CTRL key or prefixed by the
ESC (Meta) key.
Reassigned keys or newly assigned keys only affect the current session
unless you save them to a configuration file using the Save Config File
command. If you save your customized set of assigned keys to the
EDCONFIG file, HP EDIT automatically reads in this file when you start a
session, eliminating the need for you to read in the configuration.
Alternatively, you can save the assigned keys to another file name. If
you choose this option, however, you must load the file in subsequent
sessions using the Load Config File command whenever you want HP EDIT to
read in your customized set of assigned keys.
Note that you can assign more than one key or key sequence to the same
command. However, you cannot assign any key or key sequence to multiple
commands.
Displaying Current Key Assignments.
HP EDIT provides several commands that enable you to determine the
current assignments of one or more keys or key sequences. If you want to
display a single key assignment, you can execute the Show Key Assignment
command. HP EDIT prompts you for the key to be displayed and then
displays the specified key and its associated command on the message
line.
If you want to display all key assignments, you can execute the Show All
Key Assignments command. HP EDIT temporarily suspends the editing
session and displays a separate screen that lists all of the keys
assigned to commands. The Insert All Key Assignments command essentially
performs the same function, except that HP EDIT does not suspend the
editing session and inserts the list of key assignments directly into
your text instead. This function is useful if you want to print the file
with the inserted commands to obtain a hard-copy list of the assignments.
The Show Reassigned Keys command functions similarly to the Show All Key
Assignments command except that HP EDIT displays only keys that have been
reassigned, rather than all key assignments.
Returning Keys to Their Default Assignments.
After you have assigned one or more keys, you may later decide that you
want to return them to their default values. You can use the Reset Key
Assignment command to return a single assigned key to its default value.
HP EDIT prompts you for the key to be cleared and then displays the
specified key and its original command name, if any, on the message line.
You can return all keys to their original default values by executing the
Reset All Key Assignments command.
Security Management
Commands in this category enable you to encrypt all or a portion of a
file for security purposes. File encryption functions and their
associated commands are as follows:
* Encrypting text
Set Encryption Key
Encrypt
Encrypt With Key
* Decrypting text
Decrypt
Decrypt With Key
Encrypting Text.
HP EDIT provides commands to render a file or selected portions of a file
unreadable, while preserving the integrity of the file contents. This
security function prevents unauthorized users from reading a portion of a
file or an entire file. You can use the Set Encryption Key command to
define a password key for text encryption and decryption. You can then
encrypt one or more lines of text with the Encrypt command. These
commands are very useful when you want to encrypt more than one block of
text, because you can specify the encryption key one time using the Set
Encryption Key command and then execute the Encrypt command for each text
block to be encrypted.
You can use the Encrypt With Key command to specify an encryption key and
encrypt the text at the same time. This command is useful when you want
to encrypt the entire file or one portion of the file.
Decrypting Text.
To restore your text to a readable state, you can use either the Decrypt
command or Decrypt With Key command, depending on how you originally
encrypted the text. If you encrypted the text using the Set Encryption
Key and Encrypt commands, execute the Decrypt command to restore the
text. If you encrypted the text using the Encrypt With Key command,
execute the Decrypt With Key command.
MPE/iX 5.0 Documentation