SoftWoehr MyEditUtil 1.0
User's Manual
Copyright © 2000 by Jack J. Woehr
P. O. Box 51
Golden, Colorado 80402-0051 USA
http://www.softwoehr.com
NO WARRANTY NO GUARANTEE FREE SOFTWARE.
Table of Contents
SoftWoehr MyEditUtil (MEU) is a editor coded in Java to remotely edit OS/400
source physical file members. If you do not need to edit OS/400 source
physical file members, or do not know what one is, you do not need MEU.
MEU can:
-
Load a source physical file member from the server for editing.
-
Save a source physical file member back to the server.
-
Create a source physical file member on the server.
-
Get a source physical file member from the server into the edited member.
-
Save the edited member to a local text file.
-
Correctly handles any reasonable SRCDTA field length.
-
Note: MEU only edits source physical file members.
-
MEU does not understand any record formats other than that of the OS/400
source physical file.
MEU is a piece of free, open-source software which I wrote in my spare
time in the hope it would be genuinely useful. MEU is fully functional,
but several features intended for MEU are either incomplete or not yet
implemented. See the To Do list. The author
regrets any inconvenience occasioned by the limitations of MEU, If
enough people use it, we'll work out maintaining and extending MEU.
Advantages of MEU over editing on the server
-
No server CPU is used except when loading, creating, or saving members.
-
Use of mouse, menus and requesters.
-
Integrated with JTOpen.
-
Integrated with QCOpNav (QCDemo) so
you can edit and compile without the green screen.
Disadvantages of MEU compared to editing on server
-
No language-specific bindings, prompts, or automatic formatting.
-
Idiosyncracies can be confusing to experienced SEU programmer.
MEU is "vaguely like SEU" in behavior but vastly different in many aspects
Since the problems of record file text editing have been well understood
for decades, the author didn't try excercise much originality in the general
behavior of MEU. It behaves like SEU where that was convenient to code
and made sense, and behaves differently in arbitrary ways which generally
reflect the exigencies of the project. Since the author doesn't know
SEU very well, some of the commands came out more like VM/ESA XEDIT than
SEU.
Some of the simliarities and differences between MEU and SEU are noted
in the following list:
-
MEU behaves like a terminal session.
-
Your typing isn't "permanent" until you issue a command
or press an action key such as
-
You can undo typing that hasn't become "permanent" by pressing ESC.
-
MEU has a command line at the top like SEU does.
-
Note that MEU commands are a bit different than those of SEU.
-
MEU allows line commands in the line number area just like SEU does.
-
MEU line commands behave somewhat differently than those of SEU.
-
MEU's current line is not emphasized in the line number area.
-
The current line is the line the text cursor is on when the focus is on
the text area.
-
Press F10 to toggle the focus between the command line and the text area.
-
When rows are inserted, MEU's line numbers are updated immediately in 100's.
-
SEU's line numbers are updated in 10's.
-
MEU currently has no prompting or programming language knowledge.
-
The rule at the top is a simple count of characters.
-
Java 1.3 platform
-
JTOpen
java class library
-
Appropriate .jar file containing
the .java files and .class files for this application.
-
In the current release, the application .jar file is softwoehr.jar
-
Make sure this .jar file is in your CLASSPATH.
MEU may be lauched immediately loading a file member from the server or
without loading a file member. The command line is:
java com.SoftWoehr.JTOpenContrib.MEU.MEU [ -ppropfile_name
]
[ -sserver_name ] [ ifs_path_name ]
-
propfile_name is the name of a java properties file. The
properties file can have any legal filename, and if not in the current
directory, requires an absolute path. The properties which may usefully
be set are listed below.
-
Please note that no space intervenes between the -p switch and
its argument propfile_name, the properties file name.
-
server_name is the name of the AS/400 server on which one
wishes to perform editing of source members.
-
Please note that no space intervenes between the -s switch and
its argument, the server name.
-
ifs_path_name is the fully-qualified IFS pathname of the
source physical file member to edit.
-
Example:
-
jre com.SoftWoehr.JTOpenContrib.MEU.MEU -pMyProps.properties
-sAnAS400 /QSYS.LIB/DEV.LIB/CURRENT.FILE/HELLO.MBR
-
All of these arguments are optional.
-
If no arguments present, an empty window is opened from which members may
be loaded by command or menu.
-
Obviously, if ifs_path_name is present and -sserver_name
is absent, the server name must have been set in the properties file.
The properties which can be set are listed as defaults in the source file
com.SoftWoehr.JTOpenContrib.MEU.MEUProperties
.. the ones which it is useful to set are shown as follows with their default
values:
com.SoftWoehr.JTOpenContrib.MEU.system.server.ifsdirectory |
/ |
Directory on server from which to start requester widgets. |
com.SoftWoehr.JTOpenContrib.MEU.system.server.servername |
none |
Name of AS/400 to connect to |
com.SoftWoehr.JTOpenContrib.MEU.system.server.user |
none |
Username for logins |
com.SoftWoehr.JTOpenContrib.MEU.window.cascade.xincrement |
20 |
x-increment by which multiple windows are cascaded. |
com.SoftWoehr.JTOpenContrib.MEU.window.cascade.yincrement |
20 |
y-increment by which multiple windows are cascaded. |
com.SoftWoehr.JTOpenContrib.MEU.window.color.foreground |
green |
Text color. |
com.SoftWoehr.JTOpenContrib.MEU.window.color.background |
black |
Background color |
com.SoftWoehr.JTOpenContrib.MEU.window.open.xlocation |
20 |
Initial x-location of first window. |
com.SoftWoehr.JTOpenContrib.MEU.window.open.ylocation |
20 |
Initial y-location of first window. |
com.SoftWoehr.JTOpenContrib.MEU.window.edittext.rows |
25 |
Number of rows in display. |
MEU starts with one window. That window has a command
line, a text area, a menu bar, and a
status
bar. Nothing can be done in the text area until a source physical file
member is loaded for editing.
Click to see an image of that window
with a file member loaded to edit..
Multiple MEU windows may be opened. When
the last window is closed, MEU exits.
The menu bar at the top of MEU offers many operations. Note that
some operations are available at the command
line which are not available from the menu.
Each menu operation can be reached by accelerator key sequences as shown
in the the following description of available selections:
-
File
-
New
-
Create and edit a new file member on the server.
-
Note: MEU only creates members. You may use QCOpNav to execute remotely
the server command CRTSRCPF to create a source physical file.
-
See the NEW command
-
Open
-
Open a file member on the server for editing in the current MEU session.
-
Previous session is closed. If member is changed, user is offered the choice
of saving.
-
See the EDIT command
-
Save
-
Clear the file member on the server and write back the edited buffer.
-
Doesn't clear-and-save if buffer unchanged.
-
Use the FILE command to force clear-and-save to the server.
-
See the SAVE and FILE
commands.
-
Save As
-
Save current edit buffer as a different member on the server and continue
session on that different member.
-
If member does not exist, user is offered choice of creating it on the
server from within MEU.
-
See the SAVE and FILE
commands.
-
Save Locally
-
Save the current edit buffer as a local text file.
-
This does not effect the changed status of the member being edited.
-
Print
-
Close
-
Close the current window.
-
User is prompted for save or cancel close if member has been changed.
-
If this is the last window, MEU exits.
-
See the CLOSE and FILE
commands.
-
Exit
-
Close all windows and exit MEU.
-
User is prompted for save or cancel close for each changed member that
hasn't been saved.
-
Edit
-
Cut
-
Copy
-
Paste
-
Insert Row
-
Inserts one row below current cursor.
-
Remove Row
-
Removes one row below current cursor.
-
Find
-
Prompts for a search string and finds it in buffer.
-
Replace
-
System
-
Server
-
Set the AS/400 server with which this window communicates.
-
If the server is changed from the previous editing session in this window,
the previous editing session in this window is closed.
-
User is offered choice of saving member before close.
-
See the SERVER command
-
Window
-
New Window
-
Open an new, empty MEU window ready to edit some member on some server.
-
Each window edits any one file member on any one server.
-
Cascade
-
Cascade all windows from one MEU instance in order of window creation.
-
QCOpNav
-
Lauch QCOpNav (SoftWoehr QCDemo/QCOpNav),
a tabbed notebook allowing many operations on the server.
-
When one instance of MEU opens multiple windows, only one QCOpNav instance
is launched by MEU. Subsequent use of this menu item will merely recall
the extant QCOpNav instance.
-
Settings
-
Save
-
If a properties file was loaded at startup, it is save back.
-
This is meant to save changed settings, but it doesn't yet. See To-Do
List.
-
Help
-
Help
-
Informs user there ain't no help file. RTFM and use the flyover text.
-
About
The command line (not to be confused with line
commands, which you type over line numbers) is at the top of
the window.
You may enter a line number into the command line. The editing view
will jump to that line.
The command line also understands certain commands:
-
BOTTOM
-
CHANGE /toChange/changeTo/ [times-per-line|*]
[rows|*]
-
Changes one or more instances of toChange to changeTo.
-
Separator ( / in the example) can be any character.
-
If numeric time-per-line spec present ( * means "all")
that many changes per line are performed (if toChange can be found
that many times).
-
If numeric rows spec is present ( * means "all") that
many rows are examined for the per-line change spec.
-
If a change makes a line too long, the line is truncated.
-
CLOSE
-
Close current window, prompting for save if member changed.
-
COPY firstline numlines BEFORE|AFTER
targline
-
Copies numlines lines starting with firstline BEFORE or AFTER
targline.
-
DELETE [n]
-
Delete current row or n rows including current row.
-
EDIT | LOAD library file member
-
Loads for editing the member specified.
-
FILE [library file member]
-
Force save to server (clearing extant member) of current member being edited,
whether changed or not, and close current window.
-
Uses current name unless one is provided as three arguments to the command.
-
Does not save across two different servers.
-
FIND text to search for
-
Finds precisely text to search for in the buffer.
-
FONTSIZE [nn]
-
Without numerical argument, display current fontsize.
-
With numerical argument, change fontsize.
-
GET library file member
-
Inserts the specified member into the current member being edited after
the current row.
-
INSERT [n]
-
Insert one row or n rows after current row.
-
JOIN | SPLIT
-
Split or Join current line at current cursor
-
LOAD | EDIT library file member
-
Loads for editing the member specified.
-
MOVE firstline numlines BEFORE|AFTER
targline
-
Moves numlines lines starting with firstline BEFORE or AFTER
targline.
-
NEW library file member
-
Create a new member and open it for edit. Prompt to save current member
if it is changed.
-
SAVE [library file member]
-
Save current member, or save to another member if arguments present.
-
Uses current name unless one is provided as three arguments to the command.
-
Does not save across two different servers.
-
SPLIT | JOIN
-
Split or Join current line at current cursor
-
SYSTEM | SERVER servername
-
Sets the system upon which this window will operate.
-
Either SYSTEM or SERVER can be used as the name of this command.
-
TOP
-
The status bar gives some status, but is incomplete in functionality. The
main working features of the status bar are as follows:
-
Changed/Unchanged
-
Indicates when the buffer has been changed and will need to be saved.
-
Status only becomes "Changed" following:
-
An ENTER keypress, or
-
A command issued on the command line.
-
INS/OVR
-
Inidicates (or can change --- it's a button) the INSERT or OVERWRITE status
of the editor.
-
Pending
-
Not currently implemented.
-
Intended to show when a pending line command exists.
Before anything else useful can be accomplished, the server to which you
intend to connect must be set. Use the System menu or the SERVER command
to do so. You will be prompted for a password or username and password
when a connection is actually made, e.g., when browsing for files or
The current line is the one the cursor is on. This matters for many commands.
There
is no other indication of the current line other than the cursor position.
If the cursor is in the command line, press F10 to hop down into the
edit buffer. Press F10 again to hop back up to the command line.
You can move the cursor around with the mouse or the arrow keys and edit
text. When you hit ENTER or perform most commands, line commands, or special
keys, MEU updates its records and the member becomes CHANGED as shown in
the status bar at the bottom.
Text entry can be undone by the ESC key until an action key is
pressed. Action keys cause recent text entry to become permanent,
that is, MEU is like a terminal and no typing is really recorded until
one of the following events occur:
-
An action key is pressed
-
A menu selection similar to or more powerful than an action key is selected.
-
A command is entered in the command line at the top of the editor and ENTER
is pressed for that command.
Special keys
The following keys are special; some are also action keys:
-
ESC
-
Undoes all changes since the last action key, command or menu selection.
-
PAGE_UP
-
Moves cursor to top of window
-
PAGE_DOWN
-
Moves cursor to bottom of window
-
CTRL+PAGE_UP
-
Moves cursor up one window
-
Action key: recent text entry becomes permanent and file is marked changed.
-
CTRL+PAGE_DOWN
-
Moves cursor down one window
-
Action key: recent text entry becomes permanent and file is marked changed.
-
F3
-
Close window. Prompt for save if changed
-
.Action key: recent text entry becomes permanent and file is marked
changed.
-
F4
-
Save if changed.
-
Action key: recent text entry becomes permanent and file is marked changed.
-
F5
-
Split/join at cursor
-
Action key: recent text entry becomes permanent and file is marked changed.
-
F10
-
Toggle focus between command line and text area.
-
ENTER
-
Update MEU's local records if any edits have been done.
-
Action key: recent text entry becomes permanent and file is marked changed.
-
INS
-
DELETE
-
Delete slurping back rest of line.
-
BACK_SPACE
-
Backspace over text deleting, slurping back rest of line.
-
TAB
-
Wander sort of aimlessly around the screen by four's.
You may overtype the line number at the left of each edit line. If you
enter a number, the view will jump to that line number.
Additionall, the following line commands can be entered anywhere in
the line number area:
The following features of MEU are either missing or incomplete in this
release:
-
Startup
-
Overriding individual properties from argv[].
-
Keys
-
The behavior of the TAB key currently is not terribly useful.
-
Line commands
-
Mouse-driven cut & paste.
-
Menu
-
File
-
Get Local
-
Load Local
-
Print
-
Edit
-
Settings
-
Currently almost useless.
-
Only saves extant file (without changes).
-
Creating new settings (properties) file
-
Changing settings via dialogs
-
Help
-
Status bar
-
Redraw technology possibly isn't safe at all resolutions.
-
The hideous hack in place is that the window width must never permit the
text area to reveal the '\n' at the end of each line.
-
So watch out for the status bar changing window size.
-
Command line
-
GETLOCAL
-
LOADLOCAL
-
SAVELOCAL
-
SET
-
Could use scrolling command recall
-
Internationalization
Report bugs to bugs@softwoehr.com
-
Weird JDK 1.3 bug: Two components get focus at same time, such as requester
and the command line, or the command line and the text area.
-
If it's a requester, just be careful not to hit ENTER.
-
If it's the text area / command line combo, try
-
reloading the member, or
-
open a second window and close the first.
-
Program still under development so may print some cryptic messages to stderr.
I don't often use debuggers (once every year or three).
Fairmount, Colorado
September 15, 2000