run operation

From The x3270 Wiki

A b3270 protocol message that initiates a b3270 action or sequence of actions.

Attribute/Member Required? Type Purpose
r-tag no string UI-generated tag
type no string Type of action
actions yes varies Actions and parameters

The r-tag is an identifying string generated by the user interface. If given, it will be passed back by b3270 in a run-result indication when the actions are complete.

The type gives the origin of the operation. Supported values include keymap and macro (the default). This is largely used for debug purposes in traces, but some actions behave differently with different types.

In XML, actions is a string containing a sequence of actions to run. It uses standard action syntax.

In JSON, it can be a similar string, and it can also be an object with a separate action name and arguments, or an array of such objects. New in 4.2

When the actions are complete, b3270 will send a run-result indication with the execution status and result string, if any. Note that since all UI actions are run asynchronously, these indications may arrive in a different order than they were sent. Also note that if there is an HTML syntax error in a run operation (e.g., a missing or unknown attribute), a ui-error indication will be produced instead.

Finally note that as with all b3270 macros, if one action in a multi-action sequence fails, the remaining actions will not be executed.

Examples

XML

<run r-tag="ui-1234" type="keymap" actions="Enter() PF(1)"/>

JSON

New in 4.2

{"run":{"actions":"Enter() PF(1)"},"r-tag":"ui-1234"}

{
  "run": {
    "actions": [
      { "action": "Enter" },
      { "action": "PF", "args": ["1"] }
    ],
    "r-tag": "ui-1234"
  }
}