IBM i Global

 View Only

 Disable the QINACTITV system value in some sessions

Jump to  Best Answer
Miguel Peralta's profile image
Miguel Peralta posted Mon September 22, 2025 07:10 PM

Hello, I have the QINACTIV system value set to 20 minutes, but I need only some sessions to have a longer time interval. How can I do this?

Satid S's profile image
Satid S  Best Answer

Dear Miguel

I'm assuming you refer to a 5250 telnet session to IBM i server. Please try changing the attribute INACTTMR of your display device description object using the command CHGDEVDSP (you need to have proper authority to the display device description object.)   Details of the command is here:  https://www.ibm.com/docs/en/i/7.4.0?topic=ssw_ibm_i_74/cl/chgdevdsp.html#CHGDEVDSP.INACTTMR     

But I suspect that if your display device is auto-created (with the name QPAD......), you may not be able to change this attribute. You may need to manually create a display device description of your own and specify INACTTMR value. 

Bryan Dietz's profile image
Bryan Dietz

back in the old days i wrote a program to do this.

basic setup:

set the QINACTIV to the desired length of time.

set the QINACTMSGQ to a named message queue.

in a program do a RCVMSG for the message queue named above. Message CPI1126 is sent to the specified message queue.

interrogate the message and determine if you want that user excluded or ended.

simple example: https://www.ibm.com/support/pages/using-system-inactivity-timer-disconnect-or-end-specific-jobs

Bryan

Steven Riedmueller's profile image
Steven Riedmueller IBM Champion

Hi Miguel,

This is achievable using the QINACTMSGQ system value and a relatively simple CL program.

Here is the documentation for the system value: https://www.ibm.com/docs/en/i/7.4.0?topic=values-inactive-job-time-out-message-queue-qinactmsgq

And here is an IBM KB article that includes a sample CL program: https://www.ibm.com/support/pages/using-system-inactivity-timer-disconnect-or-end-specific-jobs

You can configure your own logic in the program to give certain user profiles a longer timeout, or it could be based on group profile, or many other things.

Let me know if you need more info!

Scott Schollenberger's profile image
Scott Schollenberger

I see others have mentioned it already: a CL program to monitor a msgq specified in the QINACTMSGQ system value is the way to handle this.  The attribute INACTTMR on device descriptions will not work as the QINTER subsystem (or similar) will always have a file open for an interactive device so it doesn't timeout.