The ED command creates or modifies file items or mvBASIC programs and invokes the Editor. The Editor is a line-oriented editor that displays each attribute for a file item on a separate line. It can be used to modify existing items or to create new items.
Format
ED [DICT] filename item-list [(options)] |
Parameter(s)
DICT |
Specifies the file dictionary. |
|
filename |
Name of the file that contains the items to be edited. filename can be the name of a dictionary file, a data file, or an mvBASIC program file. |
|
item-list |
List of items to be edited. item-list can include an mvBASIC program as well as items in either a dictionary or a data file. Multiple item-IDs can be entered. An asterisk (*) specifies all items in filename. |
|
options |
The following options are supported: |
|
A |
Turns on Assembler format. |
|
H |
Displays data in hexadecimal format. |
|
M |
Turns on Assembler macro expansion. |
|
S |
When used with the A option, suppresses the display of object code. Otherwise the S option suppresses line numbers. |
|
Z |
Suppresses TOP (top of item) and EOI (End Of Item) messages. |
Description
When the Editor is invoked, the line pointer is positioned at the top of the item. The Editor prompt is a period (.). Only Editor commands can be entered at this prompt. For information on using the Editor, and Editor commands, see the Editor User Reference Manual.
Creating a New Item
The following example creates a new item in the CUSTOMERS file. The Editor prompts for the item-ID:
> ED CUSTOMERS ITEM-ID: KENNARD.J NEW ITEM TOP . |
The new item-ID is KENNARD.J. The Editor commands can now be used to create the item.
Editing an Existing Item
The following example edits the item in the CUSTOMERS file whose item-ID is SMITH.A:
> ED CUSTOMERS SMITH.A TOP . |
Creating an mvBASIC Program
The following example creates a new program called CUST-FIND in the mvBASIC program file BP:
> ED BP CUST-FIND NEW ITEM TOP . |
If CUST-FIND had not been entered on the command line, the Editor would have prompted for the item-ID.