Supervising the Network
6-19
Creating Menus
Using the NMENU Commands
GETx (GETO, GETP, GETR)
The GETx commands provide access to user input. You can request or
require user input. You can even store user input for future use. Each
variation of the GETx command uses the same parameters to control what
the user sees and does. Pay close attention to the use of spaces, commas, and
braces { }.
Command Format
GETx prompt {prepend} length,[prefill], {append}
Replace x with the letter “O,” “R,” or “P.”
• If you want the user to decide whether to enter information, use GETO.
• If you want to require the user to enter information (such as a password), use
GETR.
• If you want user input to be used by more than one EXEC command after it is
entered, use GETP. The information is assigned a variable (such as %1, %2, etc.).
Replace prompt with the text (instructions) to be displayed to the user (40
characters maximum). For example: “Enter your Password.”
Prepend is a value added to the beginning of the user response. A space is
usually required in the first GETx command to separate it from the
command issued in its associated EXEC command.
Replace length with the maximum number of characters the user can enter.
This parameter is required. For example, if you use GETR for a phone
number, limit the length to 11 characters to match the field length for the
phone number. Or if you want a state or country abbreviation entered, limit
the length to two characters.
Replace prefill with a default response displayed with the prompt. The user
can accept the default, change the response by typing over the default, or
cancel selection of the item. Prefill cannot be longer than the specified
length.
The prefill parameter is optional. If you do not want to include a default
response, enter the two commas together. (See the GETx examples on the
following page.)
Append is the value added to the end of the user response. If no value is
needed, enter braces with a blank space between them.