ACCENT R

Editor

Within ACCENT R there is a need to edit commands as they are being entered.  There is also a need for an editor to make it possible to create and modify DBL objects.

If you are simply typing in a command and make a typing error, you need a way to correct it.  If you are creating an item such as a Command Module (CM) then you need to be able to enter and edit individual lines.

ACCENT R provides interline editing with SLIM for immediate correction of typing errors.  This is the single line edit mode.  ACCENT R also provides you with TED, a line number oriented text editor.  For entering DBL objects you can use TED in conjunction with SLIM or you can specify you want to use an external Editor such as VI, Emacs or EDT.  How to use each of these is explained in this chapter.

External Editors

You may specify your favorite editor to use in creating various Data Base Library (DBL) objects, by SETting the system field @EDITOR to the equated command that calls the external editor (see example below).  The DEFINE, EDIT or MODIFY commands will invoke the external editor from @EDITOR.  Each external editor has variations in how it operates.  The specific editor's manual should be referenced if questions arise.

The default value for @EDITOR is spaces.  The ACCENT R editor (TED) is called by default if an external editor is not specified in @EDITOR.

If you are modifying an existing DBL object, ACCENT R will transfer the text to a file and call the editor as specified in the System Field @EDITOR.

After editing is complete, give the external editor commands to save the file and exit.  After editing an ACCENT R DBL object (such as a Schema Definition (SD), Data Index (DI), Command Module (CM), or Process Module (PM)), control is returned to the subcommand level of the ACCENT R editor (TED).

The SAVE or HOLD subcommand must be given to save the object in the DBL even if it has been saved with the external editor.  If the object has errors, you may give the HOLD command to save the text of the object and then give the STOP command to return to the ACCENT R command level, or you may use TED to correct them or return to the external editor by issuing the command EDIT.

HOLD or SAVE will reassign line numbers to the file starting from 1 with increments of 1.

An external editor cannot be called within a command file.  If a DEFINE, EDIT or MODIFY command appears in a command file that is being executed, the ACCENT R editor (TED) is called.

Example

*SET "EVE" TO @EDITOR
*MODIFY CM EXAMPLE

This will load the text of the CM example into EVE and transfer control to EVE.

SLIM (Single Line IMage editing)

SLIM is an intra line editor for editing a particular line by moving the cursor freely within that line.  This editing feature addresses the line image of the current or previous command, editing command, line-numbered statement, or data entry line.

The full range of SLIM’s capabilities is described in this chapter.  Becoming familiar with even a few of SLIM’s capabilities can save much time by eliminating unnecessary retyping.

SLIM is invoked by typing the control and V keys twice at the ACCENT R command level to edit the last command entered.

The line being modified is displayed on the screen with the cursor placed on the first character in the line.

Invoking SLIM immediately following an ACCENT R prompt allows image editing of the previous line entered at the same-level prompt.  For example, invoking SLIM at the first position following the command level prompt (*) allows editing of the previous command, regardless of any editing commands or data entry that may have occurred.  Invoking SLIM anywhere other than the first position of a line allows editing of the current line.

If the command or statement contains multiple lines with line continuations (ampersands, &) SLIM allows free movement between lines and edit all the lines in the command or statement.

SLIM’s line image edit mode is terminated by typing one of the following:  <CR>, <LF>, or Control-Z.

Image Editing Of Commands

The previous command line, providing one exists, can be edited by invoking SLIM Control-V Control-V after ACCENT R’s command level prompt (*).

Image Editing Of Editing Commands & Line-Numbered Statements

The previous editing command or numbered line, providing one exists, is accessed by invoking SLIM at the first position following the edit level prompt (--).  As with image editing of commands, consecutive lines can be generated by using each newly edited line as an image for the next line.  When editing is completed, ACCENT R accepts that line as if it were entered directly.

Image Editing During Insert & Replace Mode

Line image editing can also be used during text entry with the INSERT and REPLACE editing commands.  (See description of INSERT and REPLACE later in this section.) Invoking SLIM in the first character allows editing on the previously inserted line.  Invoking SLIM at any other position than the first character of the line, allows editing on that line.  When editing with SLIM is completed, the line is accepted by ACCENT R and the INSERT or REPLACE process continues until the terminator "END" or Control-Z is typed.

Slim’s Line Image Operations

The SLIM editing operations are described here.  Until image editing is terminated, any number of different editing operations may be employed.

Slim Operation

Purpose

B

 

 

 

 

The B character deletes the previous word.  A word is defined as one or more letters or digits followed by a space or tab.  Many special characters are individually considered a word:

&

*

! ç / : , ² =

>

{

[ < ( - + # ?

]

}

\ ¢ - Ù ; @  

Three special characters, period (.), percent sign (%), and the dollar sign ($) are treated as letters or digits.  They are not treated as words.

Backspace (or)
Control-H

The backspace key or Control-H moves the cursor to the previous character.  A line continuation (&) is treated as a character.

<CR>

The carriage return key displays the rest of the line and terminates SLIM editing.  If the line is a command, it will be executed.

D

The D character deletes the current character and positions the cursor on the next character.

Delete/Rubout

The Delete/Rubout key deletes the previous character and leaves the cursor on the current character.

F/S

The F (find) or S (search) character, followed by a "character" moves the cursor to the next occurrence of the specified ”character“.

I

The I character invokes the insert mode, allowing text to be inserted at the current position.  The insert mode can terminated by a carriage return or the Esc key.

P

The P character redisplays the current line and leaves the cursor at the current position.

R

The R character redisplays the current line and positions the cursor at the beginning of the line.

Space Bar

The space bar moves the cursor to the next position.

TAB

The TAB key moves the cursor to the end of the line.

Control-U

Control-U ignores all SLIM changes entered on the line, and redisplays the original line with the cursor at the beginning of the line; allows editing anew on the line restart editing.

W

The W character moves the cursor to the next word.  Refer to the B operation for a discussion of what constitutes a "word".

X

The X character deletes the current word.  Refer to the B operation for a discussion of what constitutes a "word".