IBM i sessions explained: display device, interactive job and sign-on
On IBM i, a 5250 session is a display device, and signing on starts an interactive job named after it. How device, job, user and sign-off fit together.
People say "session" for several different things on IBM i. Knowing which one is meant helps when a sign-on is refused, a device is "in use" or an administrator asks for your job name.
The three pieces
- The display device. When a 5250 emulator connects over Telnet, IBM i gives the connection a virtual display device: either a generated name such as
QPADEV0001or the device name the emulator asked for. The device exists before anyone signs on; it is what shows the Sign On display. See 5250 display devices and device names. - The sign-on. You enter a user profile and password on the Sign On display, or the emulator signs on for you; see Signing on to IBM i.
- The interactive job. IBM's work management guide: an interactive job "starts when a user signs on to a display station and ends when the user signs off". The subsystem builds it from a job description named in the workstation entry or the user profile. Every program and command you run from that screen runs in this job.
How the job is named
Every job has a three-part qualified job name: number/user/name, for example 123456/FRED/QPADEV0001.
- name: for an interactive job, the name of the workstation or emulator session you signed on to, which is the device name.
- user: the user profile you signed on with.
- number: a six-digit number the system assigns.
So the device name is how you find your own job in WRKACTJOB or WRKUSRJOB, and how an administrator finds it to end it.
One device, more than one job
- System Request can start a second interactive job on the same device. IBM calls each of the two an Interactive - System request job, one of a pair. See The IBM i System Request menu.
- Group jobs (
TFRGRPJOB) are a set of interactive jobs sharing one display device.
When the connection drops
The job does not always end with the connection. Depending on the system value QDEVRCYACN (device recovery action), the job can be disconnected and wait for you to sign on again from a device with the same name, or it can end. A disconnected job ends when the time in the system value QDSCJOBITV runs out, when its subsystem ends, or at an IPL. That is why a named device can be "in use" after a dropped connection. See 5250 device name already in use: find the old session and free the name and Why IBM i refuses a second sign-on (QLMTDEVSSN).
Related
- 5250 display devices and device names
- Signing on to IBM i
- The IBM i System Request menu
- Why IBM i refuses a second sign-on (QLMTDEVSSN)
- IBM i "Cannot automatically select virtual device" (CPF8940, CPF87D7)