Enhancements for EDITOR A.09.00 [ COMMUNICATOR 3000 MPE/iX General Release 5.0 (Core Software Release C.50.00) ] MPE/iX Communicators
COMMUNICATOR 3000 MPE/iX General Release 5.0 (Core Software Release C.50.00)
Enhancements for EDITOR A.09.00
by Bob Holdsworth
Software Technology Division
Introduction
Hewlett-Packard Software Technology Division's objective in releasing
EDITOR A.09.00 is to provide another round of most requested
enhancements, as well as bug fixes to increase stability of the product.
In the enhancements described below, you will see several new features
implemented as options using EDITOR's SET command. The question may
arise as to why a new feature is implemented as an option rather than
just modifying the default behavior. The answer is that when modifying a
mature software product such as EDITOR, it is essential to avoid any
disruption of existing customer procedures.
In order to meet this objective of stability and still provide easy
access to new features, we have tried to anticipate which new SET options
would be desirable for a significant number of users. In these cases,
JCW settings can be made prior to entering EDITOR to change the initial
behavior.
We hope you will agree that the enhancements described below represent
significant and easy-to-use improvements to the functionality of EDITOR.
Case Insensitive Operations
Optional case insensitivity is now available in EDITOR for the following:
* FIND command (both original and new syntax, see below).
* CHANGE command (string to be changed can be located case
insensitive).
* Any command that permits a character string to be specified within
a range specification, e.g., DELETE 1/"buf".
When EDITOR is first invoked, the initial behavior is case sensitive
operation. Case insensitive operation is invoked with a new option of
the SET command, shown below:
/SET NOCASE
Case sensitive operation can be resumed by specifying:
/SET CASE
For users that wish to enter EDITOR with initial behavior set for case
insensitive operation (NOCASE), the following JCW setting may be
specified prior to running EDITOR:
:SETJCW EDITORSETNOCASE = 1
Examples.
/S NOCASE
/F "TEMPSRC"
9 !purge tempsrc (8 )^
/f "run"
23 !RUN CKFIXP.TOOLS.SWAT
^(2 )
/c "run","COMMENT RUN",*
23 !COMMENT RUN CKFIXP.TOOLS.SWAT
Command Entry Through the INFO String and SET PERMY
EDITOR can now accept commands through the INFO string of the RUN
command. This enhancement was requested by users who wish to use EDITOR
from User Defined Commands (UDCs) [REV BEG] (or command files on MPE/iX).
[REV END]
Also requested to make EDITOR more usable from UDCs and command files was
an option to bypass all "YES/NO" prompting, defaulting to the YES path.
This behavior can be established by specifying:
/SET PERMY
Normal "YES"/"NO" prompting can be resumed by specifying:
/SET NOPERMY
Example.
Suppose you create the following UDC called DONTRUN:
dontrun f
run editor.pub.sys;info="s permy,nocase;t !f;c :run:,:comment run:,all;k;e"
This UDC runs the EDITOR with the INFO string which does the following:
* Sets the PERMY and NOCASE options
* Texts in the file whose name results from the parameter
substitution for !f
* Locates and changes all occurrences of the string[REV BEG] run
(case insensitive) to the string comment run[REV END].
* Exits the EDITOR after keeping the file
Note that since the PERMYES option is set, when the file is kept, the
prompt "...ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW" will
not be displayed.
Redo Command
EDITOR now supports a REDO command. When you enter the REDO command, the
last command buffer is displayed. You use the following commands to make
changes to it:
I = insert characters
D = delete characters
R = replace characters (R is optional for leading replacement
characters other than I, D, or R.)
Example.
/t testfil.test.sys
+-F-I-L-E---I-N-F-O-R-M-A-T-I-O-N---D-I-S-P-L-A-Y+
! ERROR NUMBER: 52 RESIDUE: 0 !
! BLOCK NUMBER: 0 NUMREC: 0 !
+------------------------------------------------+
*23*FAILURE TO OPEN TEXT FILE (52)
NONEXISTENT PERMANENT FILE (FSERR 52)
/redo
/t testfil.test.sys
ie
/t testfile.test.sys
Limitations.
REDO must be entered as a "simple" EDITOR command. If you attempt to use
the command in any of the following ways, it will be ignored and no error
message or warning will be displayed. You cannot enter REDO:
* In a line containing multiple EDITOR commands separated by
semi-colons
* Within a USE file
* Within a WHILE loop
* With a continuation indicator (&)
* In non-interactive (batch) mode
* Entered through the INFO string
* If no previous non-REDO command has been entered
Enhanced FIND Command - Find Through a Range
The FIND command has been enhanced with new syntax that allows the user
to locate all lines within a specified range that contain a target
string. In conjunction with the case insensitive option described
previously, this enhancement provides EDITOR users with powerful and
easy-to-use text location capabilities.
The enhanced FIND syntax is:
F[IND][Q] string{,} {range specification}
{ IN }
The range specification and string are as defined in the EDITOR manual.
The original FIND command syntax still exists and is unchanged (other
than by optional case insensitivity).
Using FIND through a range format produces different results than the
previous version of FIND. FIND through a range displays each line within
which the target string is located. Lines are displayed once, even if
the target string exists more than once within the line. No column
pointer is displayed. Upon completion, the number of lines within which
the target string was found is displayed. If "Q" (quiet) is specified,
FIND through a range suppresses line displays, displaying only the number
of lines found. If range specification consists of a single line number,
FIND through a range operates from the line number specified through the
end of the work file.
Example.
/s nocase
/f "buf",1/10
5 ARRAY SBUF(0:39);
6 BYTE ARRAY B'SBUF(*)=SBUF;
7 ARRAY DBUF(0:39);
8 BYTE ARRAY B'DBUF(*)=DBUF;
4 LINES FOUND
/f "upshift",all
10 SUBROUTINE UPSHIFT(LEN,DEST,SRC);
12 <<upshifted. >>
17 << 2. Upshifts 'in place' (i.e., @SRC=@DEST) are OK. >>
39 END; << SUBROUTINE UPSHIFT >>
46 UPSHIFT(10,B'DBUF,B'SBUF);
5 LINES FOUND
The next example shows how you can include strings in an Editor range.
The FIND command locates all occurrences of the string "array" (case
insensitive) from the beginning of the first line through the first
occurrence of the string "subroutine".
/s nocase
/f "array",first/"subroutine"
5 ARRAY SBUF(0:39);
6 BYTE ARRAY B'SBUF(*)=SBUF;
7 ARRAY DBUF(0:39);
8 BYTE ARRAY B'DBUF(*)=DBUF;
4 LINES FOUND
Optional Terminal Output Formatting Change
EDITOR, by default, sets the maximum length for a terminal write in an
interactive session to the configured terminal record length. Data to be
written to the terminal that exceeds this maximum (e.g., listing a long
line) is split up for multiple writes. This results in line wrap when
listing long lines in EDITOR. For example, on a terminal configured for
40 word record width (80 bytes), numbered list of a full 72 character
line will be seen as follows:
/l 48
48 The two asterisks at the end of this line are in cols 71/72...
**
Users with terminal environments capable of long terminal writes (for
example, software expandable terminal emulator windows in a workstation
environment) may wish to avoid the default behavior and permit long
terminal writes. This new behavior can be invoked by entering the
following command:
/SET NOLNBRK
To restore default behavior, enter this command:
/SET LNBRK
For users that wish to enter EDITOR with initial behavior set for one
terminal write per record, regardless of length (NOLNBRK), the following
JCW setting may be specified prior to running EDITOR:
:SETJCW EDITORSETNOLNBRK = 1
EDITOR takes advantage of NOLNBRK to change alignment for the display
buffer of the MODIFY command. If NOLNBRK is set, the MODIFY display
buffer will align, with line number, in a manner consistent with the LIST
command. If LNBRK is set, the MODIFY display buffer alignment is
unchanged.
Limitations.
NOLNBRK is functional only when running EDITOR in an interactive session,
i.e., EDITOR ignores the setting in a batch job.
[REV BEG]
Compact Format for Text of NM Spool Files on MPE/iX
A compact syntax is now available for texting NM spool files on MPE/iX.
The TS command may be used with one of two possible abbreviations for NM
spool file names: digits only or #O followed by digits.
Example.
Instead of the following text command:
/t o13067.out.hpspool
FILE UNNUMBERED
You may choose either of the following two usages of the TS command:
/ts 13067
O13067.OUT.HPSPOOL
FILE UNNUMBERED
/ts #O13067
O13067.OUT.HPSPOOL
FILE UNNUMBERED
Note that when a valid NM spool file name abbreviation is used, EDITOR
displays the expanded actual file name. If an invalid NM spool file
abbreviation is used with TS, no file name expansion occurs and a normal
TEXT operation is attempted.
File System Now Responsible for File Name Editing
Past versions of EDITOR have attempted to intercept potential file system
errors before the file system had a chance to deal with them. This
occurred in two areas:
1. Checking of the file name specified in KEEP, TEXT, and JOIN
commands.
2. Preventing attempt to KEEP an existing file name in an account
different than the logon account (EDITOR ERROR 71). [REV END]
[REV BEG]
EDITOR's handling of issues normally considered to belong in the realm of
the file system causes no problem on MPE V. However, on MPE/iX, where
rules about legal file names and ability to keep across account
boundaries have changed, EDITOR should not needlessly cause limitations
in functionality.
To address this issue, EDITOR has been modified to allow the file system
of the respective platform (MPE V or MPE/iX) make the determination of
whether a file name is legal or not. ERROR 71 will still occur on MPE V
systems in accordance with EDITOR's old rules. On MPE/iX, the file
system will determine whether a KEEP across account boundaries can
occur.[REV END]
Other Changes in EDITOR A.09.00
The following additional changes have also been made to EDITOR A.09.00:
* When executing an MPE command (prefixed by ":"), CIWARN conditions
will now be displayed. Previously, only CIERROR conditions were
displayed.
* Within the MODIFY command, R is no longer required to indicate
character replacement. Any leading character in the replacement
field other than D (delete), I (insert), or R (still available)
will cause replacement in the buffer starting at the position at
which the character is entered.
* Control-y subsystem break has been made more robust in VT
sessions. Occasionally this could become disabled during long
operations which involve no terminal IO, for example, when using
the FIND command.
* Unnumbered file TEXTs are documented as having no upper limit in
terms of number of records. However, in earlier versions of
EDITOR, this operation would fail for files with greater than
294,912 records.
* EDITOR default available stack space has been increased,
permitting increased nesting of USE files.
[REV BEG]
* The JOIN command can now handle NM spool files on MPE/iX. [REV
END]
MPE/iX Communicators