TED

The power of TED lies in its capability to manipulate multiple lines of text.  It can manipulate the text of any ACCENT R object that contains line-numbered statements.  When this editor is invoked for an un-sequenced System File (SF), line numbers are automatically assigned.

TED provides a variety of editing commands used to establish and change statements of all those ACCENT R objects that are defined with the DEFINE command.  The DEFINE, MODIFY and EDIT commands cause ACCENT R to enter an interactive environment called the edit level.  In that environment, use TED editing commands to enter, display, change, or save statements while defining or modifying an ACCENT R object.  At the edit level, a double-hyphen prompt (--) is displayed at the terminal to indicate that ACCENT R is ready to accept an editing command or text.

The TED editing commands are discussed in this chapter in alphabetical order.  They are listed below with their minimum abbreviations underlined.

Command

Function

ALTER

invokes SLIM on existing line(s)

COPY

copies existing line(s)

DELETE

removes line(s)

EDIT

invokes external editor if one specified in @EDITOR, otherwise SLIM is invoked on existing line(s)

FIND

locates specific text

HOLD

stores current line(s)

INSERT

allows new line(s) to be entered

MOVE

moves line(s)

NUMBER

renumbers line(s)

PRINT

display line(s)

REPLACE

replaces line(s)

SAVE

compiles and saves line(s)

STOP

leaves the edit level without compiling

STRUCTURE

accesses a Schema Definition

SUBSTITUTE

changes multiple occurrences of specific text

UP

moves to preceding line

USE

reads a specified System File

Creating New Lines

ACCENT R provides two ways to enter new lines.

Type the lines in any numerical order, and ACCENT R puts them into ascending numerical sequence.

NOTES:  If typing the number of an existing line, ACCENT R will replace the old line with the new line that is entered.

Changing Existing Lines

TED provides several editing commands for changing existing lines.  The following list points out the differences of these editing commands.  See the following pages for detailed discussion of each editing command.

Command

Function

ALTER

invokes SLIM for line image editing.

EDIT

invokes the external editor if one is specified in @EDITOR, otherwise, SLIM is invoked for line image editing; same as ALTER.  To invoke SLIM a line number must be specified.

REPLACE

deletes old lines; prompts for insertion of new lines by displaying replacement line numbers.

SUBSTITUTE

replaces a given string wherever it occurs in specific lines.

It is possible to replace a line by typing its number and the new text.

Line Addressing

Many TED editing commands allow one line, a range of lines, or up to ten line ranges to be addressed.  The following form applies to all editing commands that allow line addressing.

Line addressing can be specified in any of the following ways:

The default line range is 1:* unless specified otherwise.

Where several individual line addresses or line address ranges are allowed, the general form shows the line address specification enclosed in back slashes.  In these cases, up to ten line addresses and/or ranges of addresses can be used.  They are separated by commas.  For example, if the general form contains

\\addr1 [:addr2]\\

the following groups of line addresses could be entered:

5,10:50,70,90,200:270
.:*
10,20:90,.:.+5,*

When using a number to address a particular line, an existing line number must be specified.  However, if specifying a range, or if using a single line number as a destination pointer, line numbers that don’t exist can be used.  For example, if editing a Process Module (PM) that includes lines 10, 20, 30, 40, 50, 60, 70, any of the following line specifications are acceptable:

PRINT 60:79
DELETE 15:35
EDIT 20
MOVE 20:40 TO 55

TED Editing Commands

The following pages explain the TED editing commands.  These commands generate and alter statements from ACCENT R objects (which are created with the DEFINE command).