Why does my TSO session abend with a SYSTEM=522 completion code and what can I do to fix it?
A TSO User session is regarded by JES2 in a manner similar to a batch job step, so there is a time limit applied to the session and when that limit is exceeded, the session is automatically cancelled by JES2 with a System Completion Code 522. In a production environment the reason for this was to prevent users from coming into work, logging their terminal onto TSO, and then leaving the session sitting idle most of the work day. Even if a user is not executing any programs under their TSO session, the session is utilizing resources that could be reallocated to other users. There are several ways to increase the time limit and they are discussed here.