System abend

S622: TSO session ended after disconnect

An S622 abend means z/OS ended a TSO/E session because its terminal was disconnected, for example by a network drop or a closed emulator, and nobody reconnected to the session in time.

Also written as 622, abend 622, S622 abend, system abend 622, ABEND=S622, TSO session disconnected.

What it means

A TSO/E session runs in its own address space on the mainframe. Your 3270 emulator is only the window onto it. When the connection between the two breaks, the session doesn't end at once. If your site allows reconnecting, z/OS holds the session for a set time, controlled by RECONLIM in the TSOKEYxx parmlib member, so you can log back on and pick up where you left off. If nobody reconnects in that time, or reconnecting is switched off, the system ends the session with system completion code 622.

So S622 is not a program error. It's the system cleaning up after a session that lost its terminal. Anything that was running in the session stops, including any ISPF edit you hadn't saved.

Common causes

  • The network dropped between the PC and the mainframe. A VPN that timed out or reconnected is a frequent culprit.
  • The emulator window was closed, or the PC went to sleep, while the user was still logged on.
  • A firewall, load balancer or TN3270 server closed a connection it saw as idle.
  • A session manager in front of TSO lost or ended its own session.
  • The user started a long foreground task, such as a compile or a REXX exec, and then lost the connection while it ran.

How to find the problem

  1. Note the abend time from the IEF450I message. The connection dropped earlier than that, by up to your site's reconnect limit.
  2. Ask your systems team what RECONLIM is set to. If it is 0, reconnecting is switched off and a dropped connection can't be recovered.
  3. Check the emulator's own log, if it keeps one, for a disconnect or a TLS error at the time the connection dropped.
  4. If many users lost their sessions at the same moment, look at the network or the TN3270 server, not the users. Give the network team the exact times.
  5. If one user gets S622 often, look at that PC's power settings, its VPN client and its Wi-Fi.

How to fix it

  • Log on again. If you're still inside the reconnect window, choose Reconnect on the TSO/E logon panel to get the old session back with its screens intact.
  • If ISPF edit recovery was on, ISPF offers to recover your changes the next time you go into edit. Turn it on with the edit command RECOVERY ON, and it stays on in your edit profile.
  • Stop PCs used for long mainframe sessions from sleeping, or log off before closing the lid.
  • Ask the network team to set idle timeouts on firewalls and the VPN longer than your TSO idle limit, or use TCP keepalive so a quiet session doesn't look dead.
  • Run long work as a batch job instead of in the foreground, so it doesn't depend on your terminal staying connected.

What it looks like

IEF450I USER01 IKJACCNT TSOPROC1 - ABEND=S622 U0000 REASON=00000000
$HASP395 USER01   ENDED - ABEND=S622

Questions

Can I get my session back after an S622?

Not once the abend has happened, because the session's address space is gone. Before that, while z/OS is still holding the disconnected session, logging on with the Reconnect option brings it back.

Why does logon say my user ID is in use after a dropped connection?

The old session is still being held for you to reconnect. Log on with the Reconnect option to take it back, or wait until it ends. The message is IKJ56425I.

Is S622 the emulator's fault?

Sometimes. Closing the emulator or losing its connection both lead to S622. When many users lose sessions at once, the cause is usually the network or the TN3270 server.