session_open
Opens a 5250 session to IBM i, signs on, and returns the initial screen with field references for subsequent automation. Enables controlling green-screen applications programmatically.
Instructions
Open a 5250 session to an IBM i and sign on, then return the first screen. Also starts a live view in the browser so a human can watch what you do. Returns a screen snapshot: the literal 24x80 screen plus a field list with refs you use in screen_do.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menu | No | menu to land on at sign on. Overrides the profile | |
| device | No | virtual device name to claim, e.g. MCPDEV01. Overrides the profile. A fixed device makes a run reproducible | |
| server | No | which IBM i to use, named by a .env.<name> file. Omit for the default .env server | |
| signOn | No | sign on using the profile credentials (default: true). Pass false to stop at the sign on screen | |
| library | No | current library to set at sign on, typed into the Current library field. Overrides the profile | |
| program | No | program to land in at sign on, typed into the Program/procedure field. Overrides the profile | |
| session | No | a name for this session, so you can open more than one (default: "default") |