set menu

Use the set menu command to

Root privileges are required to configure menus and to perform any removal operations. Anyone can perform display operation.

See the menu and defaultaccess fields of the set user command for information on assigning a menu to a user.

Command Syntax

Creation Syntax

Enter the set menu command as shown below to create a menu.

set menu [c#=command] [m#=string] [range=range] [t#=string] [name=string]

Display Menu Table Entries Syntax

Enter the set menu command as shown below to display the contents of the menu table:

set menu [range=range

Display Lines of Menus

Enter the set menu command as shown below to display the contents of a menu:

set menu range=range [show={on|off}]

Remove Menu Syntax

Enter the set menu command as shown below to remove a menu from the menu table:

set menu range=range rmmenu=on

Remove Line Syntax

Enter the set menu command as shown below to remove a line from a menu:

set menu range=range rmentry=line_num

Command Fields

Command Field

Description

name=string Specifies a name for the menu. If the name parameter is not present, menus are named menuX, where X is the index number of the menu (specified in range). Names may be up to 16 characters long. Enclose names containing spaces in quotation marks.

c#=command

c - means that this is a command that is executed when a user selects this menu line.

# - specifies a line number. Lines appear in numeric order on the menu.

command - specifies any device/terminal server command, but telnet and rlogin are the most common commands to use here. Enclose commands containing spaces in quotation marks.

range

Specifies an index number for the menu. If a range of index numbers is specified, a menu is created for each index number, and named menuX, where X is the index number of the menu.

Note: If multiple index numbers are specified, do not use the name parameter (this would result in multiple menus with the same name). Instead, let the device/terminal server name the menus with the default names. You can rename the menus individually after creating them.

rmentry

Removes the specified line from the menu.

m#=string

m - means that this is a text or informational line.

# -  is a line number for the menu. Lines appear in numeric order on the menu.

string - is a text string. Enclose strings containing spaces in quotation marks.

show=on

Displays menu entries identified on the range field.

t#=string

t - means that this is a title line.

# - is a line number for the menu. Each menu can have two title lines (t1 and t2).

string - is a text string. Enclose strings containing spaces in quotation marks.

Command Examples

Creating a Menu

In this example, the set menu command creates a menu named Telnet Menu, with active fields that enable users to start telnet sessions to hosts named server1 and server2.

set menu range=4 t1="Welcome to the Communications Server" t2="Make a Selection" m1="Telnet to Server1" c1="telnet server1" m2="Telnet to Server2" c2="telnet server2" name="Telnet Menu"

Renaming a Menu

In this example, the menu created in the previous example is renamed from "Telnet Menu" to "Joe's Menu."

set menu range=4 name="Joe's Menu"

Displaying the Menu Table

In this example, the set menu command displays the contents of the menu table.

set menu

Removing a Menu from a Port

In this example, the set menu command removes a menu.

set menu range=4 rmmenu=on