Action return values

Description
Many x3270 actions, especially those designed for screen scraping, return a value. These values can simply be displayed at the x3270&gt; prompt, or inspected by scripts.

Other actions are intended for interactive use. They produce only side-effects and do not return a value.

Success or failure
Actions also succeed or fail. When an action fails, if it is part of a macro (a sequence of actions to be executed in sequence), the macro is terminated and fails. If the action was executed as part of another action, such as the Source action, the parent action will terminate and fail.

The success or failure of an action can be seen directly when using the s3270 protocol, at the x3270&gt; prompt, and when using the HTTP server:

- In the s3270 protocol, the prompt ends with ok for an action that succeeds, and with error for one that fails.

- At the x3270&gt; prompt, the output from an action that fails is displayed in red.

- When an action fails, the HTTP server returns a 400 (Bad request) error.