screen_do
Perform a full 5250 screen interaction in one call: type into fields, move cursor, press keys, and receive the final screen. Actions run sequentially, reducing exchanges with the host.
Instructions
Drive the screen: type into fields, move the cursor and press keys, in one call. Actions run in order and only the final screen comes back, so put a whole interaction in one call instead of one action per call.
Each action is a line: "type f1: ACME LTD" put text in a field, by ref from the snapshot, by "row,col", or by DDS name once known "key: Enter" Enter, F1 to F24, PageUp, PageDown, Help, Clear, Print "cursor: 6,53" move the cursor, which is an argument to the key: Help on a message line explains that message, Help anywhere else explains the field under it
Typing sends nothing to the host. A 5250 holds it locally and transmits only on a key, so ["type f1: ACME", "type f2: 100", "key: Enter"] is one exchange with the box, not three. If an action fails the run stops there and the error names it, with the screen as it stands.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actions | Yes | the actions, in order, e.g. ["type f1: ACME LTD", "key: Enter"] | |
| session | No | which open session to act on. Omit unless you opened more than one (default: "default") |