EnterApp

Web Services Council

Enterprise Applications
User Guide

Qedit

Qedit Features

Qedit is a text editor for the HP3000 computer that allows creation and editing of text files. These text files may then be used with other programs. For example, write a quiz program in Qedit and use it later in quiz.

Qedit runs in two modes: line mode and visual mode. When in line mode, Qedit accepts each command as it is typed and executes the command when pressing the return key. Visual mode, also known as full-screen mode, allows any number of changes to any lines that are displayed on the screen and executes the changes by pressing the Enter key. In visual mode, enter line-mode commands on the 'command' line (usually the top line), and execute them by pressing Enter or F7.

Although Qedit also functions as a word processor the person is encouraged to use the PC based wordprocessors currently supported on campus for most word processing needs. However, Qedit can assist the person when editing documents. The person may justify text within margins, center text, assign right and left margins, and do word wrap.

Qedit runs on any HP terminal, or IBM PC (and compatible) running a terminal emulator. Visual mode works only if a terminal or terminal emulation program that supports BLOCK MODE is used. Reflection, and Minisoft are terminal emulation programs that support block mode.

To access Qedit select Qedit (File Editor) from the System Utilities menu. A status message and the Qedit hint for the day will display on the screen. Once the hint has displayed Qedit's prompt character / will appear.

Line Mode Commands:

ADD - Used to add, insert, copy, move, and join text to the file.
Examples:
/ADD 56 - Adds blank lines beginning at line 56; enter // to stop adding lines.
/A 5=20/35 - Copies lines 20 through 35 and inserts them at line 5.
/A 5<20/35 Moves lines 20 through 35 to line 5.
/A 5= YOURFILE - Copies the contents of YOURFILE to line 5.
/A 5=AFILE 20/30 - Copies lines 20/30 of AFILE to line 5.

CHANGE - Allows changes to text within a work file.
Examples:
/CHANGE "the"the"@ - Changes "the" to "the" in the file. All occurrences of "the" will be affected. The '@' character means 'all'.
/C:teh:the: 5 - Same as above, except only line 5 is affected. The colon character may be used instead of the double quote character.
/C "the"the" 5/10 - Same as above, except the change will affect only lines 5 through 10.

DELETE - Allows deletes to one or more lines in a work file. Examples:
/DELETE 5/6 - Deletes lines 5 and 6 from the file.
/D 5/last - Deletes all lines from line 5 through the last line in a file.
/D 2,4,5/10 - Deletes lines 2, 4, and lines 5 through 10 in the file. (Note: If lines are inadvertently deleted, cancel the delete by pressing Ctrl-Y immediately after the deletion of lines was performed. Qedit will respond 'Undeleted!' and the lines will be as they were before.

EXIT - To exit Qedit and return to MPE/iX or the Menu.
Example:
/Exit - Qedit also recognizes any abbreviation of exit (E, EX, EXI).

HELP - To obtain help on Qedit or on a specific Qedit topic.
Example:
/HELP - To obtain help on Qedit (the entire manual is available on-line).
/H LIST - To obtain help on list command.
'HELP' may be abbreviated to 'H' KEEP To keep a copy of the file currently being worked on.

KEEP - To keep the current file.
Example:
/KEEP MYFILE - Keeps the file and gives it the name MYFILE. If the file already exists, Qedit will ask if it is to be kept.
/K PARTIAL 2/10 - Keeps lines 2 through 10 in a file named PARTIAL.
/KQ MYFILE - Keeps the file and gives it the name MYFILE. The 'Q' means 'QUIET'; this instructs QEDIT to not keep internal line numbers in the file. It is desirable to not include line numbers if the file will be used by another program such as printing it in TDP.

LIST - To print lines of a file to the screen or a printer. Files can be listed to the laser printer or to an attached printer using this command.
/LIST 5/25 - Lists lines 5 through 25 on the screen.
/L 5/last - Lists lines 5 through the last line on the screen.
/L "word" - Lists any line containing the character string "word".
/L MYFILE - Lists the lines of MYFILE, even though not currently editing MYFILE.
/L MYFILE 20/30 - Lists lines 20 through 30 of MYFILE.
/LJ MYFILE - Lists the lines of MYFILE. The 'J' means 'Jumping'; it will display a screen full and ask the person to press return before continuing.
/L LP MYFILE - Lists MYFILE to the printer. LP means Line Printer.
/L MYFILE,LP - Same as above
/L LP @ - Lists all lines of the current file to the printer. /L @,LP - Same as above. /L 1/10,LP - Lists lines 1 through 10 to the printer.

MODIFY - Allows changes to one or more lines of text within the file. The command will display the line specified, and place the cursor on the first character of the line. Then use the keys to make the changes. While in modify, use special sequences of keys to perform modify functions; some of those commands are listed below. Basically, to replace a character, simply type the new character over the old one. Use the space bar and backspace key to move back and forth over the line. When finished editing that line, press return; the changes are then made permanent in the file.
Examples:
/MODIFY 14 - The modify mode on line 14.
/M "word" - The modify mode for each line that contains the character string 'word'.
/M 4/7 - The modify mode for each line starting at line 4 and continuing through line 7. Press return to continue to the next line. As mentioned above, the modify command contains special key sequences known as control keys to perform various modify tasks. To use the control key sequence, press AND HOLD the control key while pressing the associated alphabetic key.
CTRL-O - Overwrite. This key places modify into overwrite mode. Any key pressed afterward replaces the character the cursor is on. Terminate overwrite mode by entering CTRL-T.
CTRL-D - Delete. This key deletes characters at the cursor.
CTRL-B - Before (insert mode). This key places modify into the insert mode. Any character typed will be placed before the cursor location. Use CTRL-T to terminate.
CTRL-A - Append. To append characters at the end of the line.
CTRL-V - Split. To split the line into two lines at the cursor location.
CTRL-G - Goof. To undo all editing on that line.
CTRL-T - Terminate. Terminates overwrite or insert mode.

OPEN - Allows a file to be opened for editing (see also TEXT). Only Qedit files can be opened and shut. Using the Shut Command converts the file to a Qedit work file. When a file is edited in Open/Shut mode, changes are made directly to the Open file. This is in contrast to Text/Keep mode in which changes are not saved until the file is Kept. There is the possibility that changes can be lost if a Text/Keep file is not kept for some reason although in some cases the ability to discard recent changes with out keeping them is an advantage. The following are equivalent:
/Open MYFILE
/O MYFILE
If a message "Warning... Invalid format for work file" or "Error: You can only Open Qedit workfiles" appears, then use TEXT to get into the file.

RENUMBER - Allows a file to be renumbered.
/REN
/S RE

SET - Allows various Qedit environment options to set. Type VERIFY to see what the options currently are.
Some helpful options of the SET command are:
/S Increment - To set the increment line number between added lines.
/S List - To set list parameters when listing to a printer. See below for a more complete discussion.
/S VISual - To configure the Visual mode. See below. The Set List command has several options on its own that allow configuration of Qedit print listings. The options are: LINE [0-256] To specify the number of lines on a page. RECORD {ON/OFF} To tell Qedit to print to the slaved printer or the big printer in the computer center. DBL [ON/OFF] To print double spaced listings. For example, to set Qedit to print 40 lines per page, double spaced, type:
/SET LIST LINE 40,DBL ON
To Set Qedit to print to the slaved laserjet, 50 lines per page, type:
/S LIST RECORD ON,LINE 50

TEXT - To text a file into a temporary work space and edit it there. Once a file is texted in, it must be kept (via the KEEP command) in order for the changes made to take effect.
/Text MYFILE
/T MYFILE

SHUT - To shut a file that has been opened using the OPEN command. No parameters are required. The Shut Command may be used to convert a text file to a Qedit work file.
/Shut

VISUAL - To switch Qedit to Visual (Full Screen) mode.
/VI 10 - switches to visual mode at line 10.
(In Novice mode all functions are defined with the function keys F1 - F8. Remember, to make the changes hit (ENTER).)

VISUAL LINE EDITING - To switch to this line mode editing called VEMODIFY/QMODIFY enter the command /SET M=VEM. The idea behind this modify mode is 'What you see is what you get'. The modify functions or control codes are the same as the regular QEDIT modify (CTRL-O, CTRL-D, CTRL-B), but there are more. CTRL-Q will display all QZMODIFY commands (note: the command ctrl-Q is entered while modifying a line in this mode). This mode may be the default for some.

Line Mode Commands

ADD - Used to add, insert, copy, move, and join text to the file.
CHANGE - Allows changes to text within a work file.
DELETE - Allows deletes to one or more lines in a work file.
(Note: If lines are inadvertently deleted, cancel the delete by pressing Ctrl-Y immediately after the deletion of lines was performed. Qedit will respond 'Undeleted!' and the lines will be as they were before.
EXIT - To exit Qedit and return to MPE/iX or the Menu.
HELP - To obtain help on Qedit or on a specific Qedit topic.
KEEP - To keep a copy of the file currently being worked on.
LIST - To print lines of a file to the screen or a printer.
MODIFY - Allows changes to one or more lines of text within the file.
As mentioned above, the modify command contains special key sequences known as control keys to perform various modify tasks. To use the control key sequence, press AND HOLD the control key while pressing the associated alphabetic key.
CTRL-O - Overwrite. This key places modify into overwrite mode. Any key pressed afterward replaces the character the cursor is on. Terminate overwrite mode by entering ^T.
CTRL-D - Delete. This key deletes characters at the cursor.
CTRL-B - Before (insert mode). This key places modify into the insert mode. Any character typed will be placed before the cursor location. Use ^T to terminate.
CTRL-A - Append. To append characters at the end of the line.
CTRL-V - Split. To split the line into two lines at the cursor location.
CTRL-G - Goof. To undo all editing on that line.
CTRL-T - Terminate. Terminates overwrite or insert mode.

OPEN - Allows a file to be opened for editing (see also TEXT).
RENUMBER - Allows a file to be renumbered.
SET - Allows various Qedit environment options to set. Type VERIFY to see what the options currently are. TEXT - To text a file into a temporary work space and edit it there.
SHUT - To shut a file that has been opened using the OPEN command.
VISUAL - To switch Qedit to Visual (Full Screen) mode.

Qedit Visual mode

If using an HP terminal or PC with Block Mode (most HP terminals and IBM PCS and compatible running Reflection or Minisoft), the person can use Qedit for full-screen editing. Edit an open file by moving the cursor around the screen, inserting, deleting, copying and moving text. To get into visual mode, type VI when in a file and press return. The screen then displays 19 or so lines of the file on the entire screen. In Reflection for windows Reflection will automatically change to 132 column mode when necessary.

Screen Layout

Once the screen displays, it looks something like this:

	  ===>
		 (status line that displays file status etc.)
	  *
	  +1
	  +2
	  +3 This area will display the lines in the file.
	  +4
	  +5
				...
	  19
	  // ....|....10...|....20...|....30...|....40...|....50...|....60

Homeline (the line with ===>): Type commands, search strings and line numbers here. They are executed when pressing F7. Type ? and press F7 for help.

STATUS LINE
The second line shows the current "*" line, the current file, the current string and some hints. (Note: a SET command can be used to relocate the current line.)

TEXT LINES
Default is the "*" (current) line and 19 lines after it. Each line has a 4-column prefix with the relative line number (*+3, *-5), "?" if the line has non-printing characters, "!" if the line is too long, and room for cut and paste codes.

TEMPLATE LINE
The last line has // and a column template. The // signals end-of-screen to Qedit. This line must NOT be deleted.

Using The Keyboard

In visual mode the keyboard gives the person the means to move around the screen, edit text, and control the flow of Qedit.

Moving: Move around the screen using the cursor keys and others if available:

Cursor Left
use the left arrow key

Backspace
use the backspace key or left arrow key

Cursor Right
use the right arrow key

Cursor Up
use the up arrow key (not the carat)

Cursor Down
use the down arrow key

Carriage Return
down to next line

Homeup
Return to ===> line use the diagonal up arrow,

Tab
Move to the next right tab position. Use SET TAB

Shift Tab
Move to the next left tab position

Prev Page
Don't use

Next Page
Don't use

Editing: Revise the screen image using these keys if available:

Space bar
Move the cursor right and erase the character

Any Character
Overwrite the character at the cursor and move it right

Delete Char
Remove the character at the cursor and move the text left

Insert Character
Enable insert mode; any subsequent characters typed will be inserted at that point. Text will move to the right. Press the insert key again to disable.

Insert Line
Insert a blank line above the current line;

Delete Line
Remove the line at the cursor.

Clear Line
Erase the line from the cursor to end of line.

Clear Display
DON'T USE (If inadvertently this key is pressed, do a Homeup to get to the command (===>) line type * and press F7; that will refresh the screen.)

To save the changes to this page:

Enter Key
This key transmits the changed text to the computer.

For HP150s there are several other keys:

Select Key
Not used

Stop Key
Don't use in visual mode

Break Key
Disabled in visual mode

Reset Key
Use only if the screen locks up, then press enter. For Reflection and Advancelink press ALT and S.

Escape
Not used in visual mode.

DEL
Not used in visual mode. (HP150 only)

If using a PC with Reflection or Minisoft, the PC keys need to be mapped to the HP keys. Here are the keys commonly required in reflection.

Enter
The Enter key on the numeric keypad.

Homeup
Press control (CTRL) and HOME

Homedown
Press control and END

Start of Line
HOME

End of Line
END

Insert Line
ALT-I

Delete Line
ALT-D

Clear Line
ALT-K

Clear Display
ALT-J Don't use in visual! See above.

User Keys
F9

System keys
F10 then type ? and press F7 for help

Special Line Indicators

Columns 3 and 4 of the text lines may contain special indicators:

!
The line extends beyond the visual right margin. To shift the screen image to the left in order to see the rightmost lines, type SET LEFT 55 at the command line and press F7.

?
The line contains control characters, shown as dots. These lines are NOT updated when enter is pressed; use the modify command on them.

Function Keys

The convenience of visual mode results from the power built into the user function keys: F1 through F8.

F1 - Update screen; get next page
Qedit updates this page and displays the next. F1 combines F6 and enter in a single key. F1 does not execute any command typed on the command line.

F2 - Roll screen up NN (# of lines)
Qedit clears the screen and displays a new one that is rolled up n lines (default=6), where n is controlled by SET VIS ROLL. SET VIS ROLL 9 for a nine-line roll.

F3 - Findup (search backward for string)
Qedit searches backward in the file starting form the "*" line, until it finds a line that contains the current string. Qedit clears the screen and displays a new page with "*" positioned at the line that contains the string.

F4 - Find Next (search forward for string)
Qedit searches forward in the file, starting from the "*" line, until it finds a line that contains the current string. Qedit clears the screen and displays a new page, with "*" positioned at the line that contains the string. Before using F3 or F4, a target string must be entered. Do this by typing the string to be found in quotes at the command line (===>) and pressing F7. The current string displays in the status line. Use F3 and F4 to find occurrences of the string.

F5 - Go backward one page
Qedit clears the screen and displays the previous page. By default, the top line of the current screen becomes the bottom line of the new screen. Use SET VIS CARRY to change the number of lines carried over to the next screen.

F6 - Go forward one page
Qedit clears the screen and displays the previous page. By default, the top line of the current screen becomes the bottom line of the new screen. Use SET VIS CARRY to change the number of lines carried over to the next screen.

F7 - Execute command on ===> line
The F7 key executes the command on the ===> line without updating the screen. Also execute the Homeline by entering a command and pressing enter. Any line mode command will work, as will MPE/iX commands (SHOWME, SHOWTIME, etc.) and calculator commands (=5+3). Also enter special visual commands on this line. See below for enumeration of these commands.

F8 - Exit from Visual mode to line mode
If for some reason F8 fails to exit from visual, type / in the command line and press F7 or enter. This should exit out of visual.

Cut and Paste

Visual allows a block of text without to be moved or copied referring to the line numbers. This is called "Cut and Paste" and is accomplished by entering special indicators in columns 3 and 4 of screen lines before pressing the enter key. Columns 3 and 4 are shown as $$ on the screen layout above. The indicators are:

MM
begin and end of the block to be moved

M
a single line to be moved

HH
begin and end of a block to be held

H
a single line to be held

CC
begin and end of the block to be copied

C
a single line to be copied

P
insert the block or line "preceding" this line

PH
insert a held block "preceding" this line

B
insert the block or line "before" this line (same as P)

BH
insert a held block "before" this line (same as PH)

F
insert the block or line "following" this line

FH
insert a held block "following" this line

A
insert the block or line "after" this line (same as F)

AH
insert a held block "after" this line (Same as FH)

DD
begin and end of a block to be deleted

G
glue line with previous line (GJ with space)

GG
glue pairs of lines together

V
diVide at ~ Field seperator

VV
diVide a range of lines

R
replicate (duplicate) this line

Rn
replicate this line n times ( n>0<=9 )

Cancel any of the cut and paste options by typing a period at the Homeline ( ===>. ) and pressing F7.

Enter the indicators in any order and on different screens. When the person has defined a complete block and an insertion spot, Qedit completes the move or copy and resets the indicators. When a cut and paste task is only partly defined, Qedit enhances the indicated lines and adds a warning to the status line. Reset the current task by entering a period "." in the ===> line and pressing F7. When the insertion point is on the current screen, Qedit will renumber the screen if needed (and if SET VIS RENUM ON is in effect).

Command Line

Press the Homeup key to get to the ===> command line. Then type a command and press F7 or enter. Anything that can be done in Line mode can also be done in visual, via the command line. After doing a Homeline command, Qedit prompts for more commands ('Next command [VISUAL]') until return is pressed. In the examples below, the quotation marks " are shown for clarity, and MUST NOT BE TYPED AS PART OF THE COMMAND! Some of the functions that can be accomplished are:

Refresh Redraw the original page on the screen; type "*" and press F7. DO NOT PRESS ENTER, since this will update the screen. This is useful if the clear display has accidentally been pressed.

Help Get instructions on the use of Qedit. To get help for visual mode specifically, type "?" and press F7.

Type 'Ex' to Exit from visual to line mode.

Also, any line mode command (C "the"the"@, etc.) will also work.

Using Qedit As A Word Processor

Word Processing Features

1. Qedit can justify, center, align left and right margins and indent. The command that is used for word processing purposes is the Justify command.

The general format of the Justify command is:

JUSTIFY [option] [keyword] [line range]

The possible options are:

JUSTIFY RIGHT
Right justify each line

JUSTIFY CENTER
Center each line

JUSTIFY LEFT
Remove leading spaces

JUSTIFY FORMAT
Fill lines, ragged right margin

JUSTIFY BOTH
Fill lines, even right margin

JUSTIFY NULL
'Safety' feature; causes no changes

The keywords accepted by the Justify command are:

MARGINRIGHT column
Sets the right margin, relative to left INDENT nn Sets the indentation at nn spaces

2. Shorten keywords to the first letter. See the on-line help for more information on the justify command.

Examples:

Justify center 5/6
Centers lines 5 through 6

J Right 5/6
Right-justify lines 5 through 6

J left 5/6
Left-justify lines 5 through 6

J format 5/50
Format lines 5 through 50 into margins

J both 5/50
Format lines 5 through 50 straight right edge.

Interfacing With TDP

Qedit is a powerful text editor; however, sometimes access to various fonts and characters are available only through TDP. Because QEDIT now offers access to TDP's formatting capabilities, it is no longer necessary to use TDP to create and edit text files. Form letters, mass mailings, reports, etc. that use TDP's formatting command can now be created using QEDIT's enhanced editing capabilities and then submitted to TDP via one of the following commands ([]'s indicate optional parameters):

TDPFINAL [Q] [FROM filename] [TO filename]
TDPDRAFT [Q] [FROM filename] [TO filename]

If the TO filename option is used, the FROM filename option must also be included and cannot reference the currently open QEDIT work file.

Sorting Records

1. LSORT is the QEDIT command for sorting a file. By default the entire line is used for sorting in ascending order.

The file can be sorted by specified key fields and by descending order. To sort a file, first text in the file.

The following are examples of how to sort the file:

:QED
/T filename
/lsort all - sort entire file in ascending order
/lsortq all - sort entire file without printing on screen
/lsortq 10/33 - sort only some lines (10 through 33 in this example)
/lsort 30/last keys 10,5 - sort lines 30 to end of file, starting in column 10 for 5 characters
/lsort 20/last keys 1,10 20,5 desc - sort lines 20 to end of file using two key fields in descending order
/lsort 20/40 keys 1,10 20,5 - sort lines 20 through 40 with the 2 key fields

2. The keys are specified by keylist parameters. The keylist consists of one to four keys separated by spaces of commas, with a key consisting of either a column range of a starting column and length:

/lsort all keys 1/20
- key is defined as columns 1 through 20

/lsort all keys 1,5 10,20
- two key fields, first one is column 1 for 5 characters, the second is column 10 for 20 characters

/lsort all keys 1,5 10,20 desc
- same as above example only sorted in descending order

3. The person may now list, print, keep, etc. One might keep the file with a new name so the data can be used in either sequence.