Prompt action (<prompt> element)

The Prompt action provides a powerful way to send immediate user keyboard input into the 3270 or 5250 application or into a variable.

This action can be specified using the VME, see Prompt action, and using the AME, see Prompt action.

The Prompt action displays on top of the host terminal a prompt window that contains a message, an input field, and three buttons (OK, Cancel, Help). After the user types text into the input field and clicks OK, the Prompt action uses the input in one or both of the following ways:
  • The Prompt action types the input into an input field of the host terminal.
  • The Prompt action interprets the input as a string and stores the input into a variable.

A typical use of this action, but by no means the only use, is to permit the user to provide a password. Many scenarios require that a macro log on to a host or start an application that requires a password for access. Because a password is sensitive data and also typically changes from time to time, you probably do not want to code the password as an immediate value into the macro.

With the Prompt action, you can display a message that prompts the user for a password and that lets the user type the password into the input field. After the user clicks OK, the macro runtime types the input into the host terminal at the row and column location that you specify. The input sequence can include action keys such as [enter], so that if the user types MyPassword[enter] the macro runtime not only can type the password into the password field but also can type the key that completes the logon or access action. (Or, you can put the action key into an Input action that immediately follows the Prompt action.)

Note: The default values for prompts are stored in macro files unencrypted. The default values display in the clear when you edit prompts in the macro editors. Therefore, while using a prompt to specify a password is an appropriate thing to do, for security reasons you should not specify a default value for the password.

For more information, see <prompt> element.