Is there a way for iSeries AS400 sessions not get disconnected or locked
Solution 1:
This behaviour is not accidental, it is a deliberate security setting. Say you have a terminal in a public space. If a visitor decides to try random user profile / password combinations, the system can be configured to disable the profile and device. The idea then is that the administrator would check the log and see what is happening before simply varying the device back on. WRKSYSVAL QMAXSGNACN to see the current setting. A companion system value is QMAXSIGN - if this is set too low, the end users may be disabling themselves too easily.
There are other settings which tell the system whether to automatically configure devices or not. See the system values QAUTOCFG and QAUTOVRT.
You really should check the system history log (DSPLOG QHST) as well as the system operator message queue (DSPMSG QSYSOPR) to see why the devices are being varied off.