MED

MED

Top  Previous  Next

 

The MED command creates or modifies a menu definition.

 

 

Format

 

MED {file.name {menu.name}}

 

where

 

file.nameidentifies the file holding the menu.

 

menu.nameis the name of the menu record to be processed. Menu names are case sensitive.

 

If the file or menu names are omitted from the command line, MED prompts for these. When prompting for menu names, MED will edit the given menu and then prompt for a further name. This is repeated until a null menu name is entered.

 

 

Menus are normally stored in the VOC file but can be stored in any file of the application designer's choice if an R-type (remote) VOC record is used to point to the menu record in the other file.

 

If the menu does not exist, MED prompts for confirmation that it is to be created.

 

The display of a typical menu might appear as shown below:

 

 

Title :ORDER PROCESSING SYSTEM : MAIN MENU

Subr  :OPS.MENU.VALIDATE

Prompt:

Exits :

Stops :

--------------------------------------------------------------

Text 1:Customer Maintenance

Action:CUST.MENU

Help  :Enter customer maintenance menu

Access:CUST

Hide  :

--------------------------------------------------------------

Text 2:Order Entry

Action:RUN BP ORDER.ENTRY

Help  :Runs the order entry system

Access:ORDERS

Hide  :

--------------------------------------------------------------

Text 3:Invoice Management

Action:INV.MENU

Help  :Enter invoice management menu

Access:INVOICES

Hide  :

 

VOC ORDERS                                             F1=Help

Access control subroutine key for this option

 

 

MED uses a subset of the SED full screen editor default key bindings to allow the user to move around within the display and enter or modify text. These are:

 

Ctrl-A

Home

Move to start of line

Ctrl-B

Cursor left

Move left one character

Ctrl-D

Del char

Delete character

Ctrl-E

End

Move to end of line

Ctrl-F

Cursor right

Move right one character

Ctrl-G


Cancel partially entered key sequence

Ctrl-K


Kill line

Ctrl-L


Refresh screen

Ctrl-N

Cursor down

Move down one line

Ctrl-O

Insert

Toggle overlay mode

Ctrl-P

Cursor up

Move up one line

Ctrl-V

Page down

Move down one page

Ctrl-X C

Ctrl-X Ctrl-C

Exit (some terminal emulators may not permit use of the second form)

Ctrl-X S

Ctrl-X Ctrl-S

Save

Ctrl-Y

Esc-Y

Paste data previously removed with Ctrl-K

Esc-V

Page up

Move up one page

Backspace


Backspace

Esc-H

F1

Help

Ctrl-X V

F4

Show menu

 
Because of key binding conflicts on some terminal emulations, key bindings in the second column may not be available on all terminal types.

 

The leftmost few characters of each line display a line type key. The remainder of the line is editable and the line on which the cursor is positioned will pan if required to allow text data wider than the display device.

 

The bottom line of the screen displays a single line help prompt at all times. Pressing F1 will display a help page appropriate to the line on which the cursor is positioned. Pressing F1 again while this help text is displayed will display help on the key bindings.

 

The first section of the menu data displayed by MED contains information that relates to the entire menu:

The menu title line

The access control subroutine name (see VOC M-type records)

The prompt text

Exit codes

Stop codes

 

The remainder of the displayed data is a set of sections corresponding to the menu options in the order in which they will appear on the menu. Each section contains:

The option text

The action sentence. Terminate with a semicolon for an automatic "Press return to continue" prompt

Help text for the option

The access subroutine key

A flag indicating whether the option is to be hidden if it is unavailable

 

The separator line between each section has some special features. Pressing the return key while on this line inserts a new menu option entry under the line. Use of the kill line function (Ctrl-K) on this line deletes the menu option under the line, placing it in the kill buffer. Repeated use of the kill line function places all of the deleted menu options in the kill buffer.

 

When the kill buffer contains one or more complete menu options, use of the paste function (Ctrl-Y) inserts the kill buffer content under the current option. Use of kill and paste can be used to move options within the menu.

 

When on a text line, the kill line function deletes all text after the cursor, placing it in the kill buffer. The paste function can be used to paste this text into another line.

 

See VOC M-type records for more details of menu definitions.