NET/MASTER Management Services (MS) System Management Guide
Configuring Utility Prompt Recognition
Managing Access to External Utilities and Applications
115414 NonStop NET/MASTER MS System Management Guide 6–25
If none of the command prompt fields contains data, NonStop NET/MASTER MS
records the first prompt the utility issues. Any prompt that ends with the same
character as the first prompt is considered the command prompt; any prompt that
does not match the command prompt character is considered a prompt for other data,
such as a confirmation command.
Utilities with complex prompt systems demand more configuration than the default
prompt recognition system provides. When defining such utilities, use the command
prompt fields to describe the command prompt to NonStop NET/MASTER MS. The
next three examples demonstrate use of the command prompt fields to accommodate
command interpreters with complex prompts.
Example 1: Command and
Confirmation Prompt Share
Character
Consider the case of a utility that prompts for commands with a question mark (?) and
asks you to confirm actions with some text, such as YES or NO, followed by a question
mark. Such a prompting system confuses the CIP, which, by default, interprets the
confirmation prompt as a command prompt because both prompts end with a
question mark.
To recognize that utility’s prompt, enter a value of 2 in the Length less than field and a
question mark in the Ending with this character field. The CIP will interpret as a
command prompt any prompt that has fewer than two characters and ends with the
question mark.
Example 2: Variable
Prompt Length
Suppose you wish to define a utility that prompts for commands with a command
number and a space. The CIP’s default configuration does not correctly process a
prompt so structured because the last character of the prompt, after dropping trailing
spaces, varies. You can manage such cases by entering the integer 5 in the Length less
than field.
Such a configuration would instruct the CIP to accept as a command prompt any
command interpreter output text that, after discarding trailing blanks, has fewer than
five characters. Such a configuration allows the utility to issue up to 9999 command
prompts. Although somewhat incomplete, the configuration works as long as the
utility does not issue short confirmation prompts. You could also handle the prompt
by using a regular expression, such as the one in the next example, to describe the
prompt:
Matching this pattern = ^[0-9]+$
Example 3: Varying
Prompts
Some utilities use different characters for command prompts. For example, the
INSPECT product can prompt for commands with either a string ending with an
underscore or a string ending with a hyphen. You must use a regular expression, such
as the next example, to describe such command prompts:
Matching this pattern = -|_$