iCan Blog Archive

I’m sure most of you know how you can use Qshell to get a Unix -like interactive environment.  You start an interactive Qshell session by using the Start QSH (STRQSH) or QSH command with *NONE for the CMD parameter.

A long-standing customer concern was the Inactive Job Time-Out (QINACTITV) did not work for these jobs; while they were interactive jobs, they could sit inactive, unused, and would never time out.

In IBM i 7.3, this changed. Interactive QShell jobs will time out just like other inactive interactive jobs. When the job has been inactive for the time defined by the QINACTITV system value, the action defined by the Inactive Job Time-Out Message Queue (QINACTMSGQ) system value will be taken.

If the QINACTMSGQ system value setting results in the job being disconnected (*DSCJOB), you will be able to reconnect to your job and return to your Qshell session (assuming you sign back on to the same device with your user ID before the disconnected job ends (QDSCJOBITV)).

If the information above is not sufficient, here’s more information about how this works.

QShell support uses a data queue named QP0ZTRML in the QTEMP library.  In 7.3, the CRTDTAQ command was enhanced to support a type of *DSP.  The new data queue type indicates the application is using this data queue with a display file, and the application is then eligible for the inactive job time out.

Prior to 7.3, a WRKACTJOB on a QSH job shows it in DEQW (dequeue wait) status:
QPADEV0003   DMAY        INT      .0  CMD-QSH          DEQW  

In 7.3, you will now see the QSH jobs in DSPW (display wait) status:
QPADEV0004   DAWNMAY     INT      .0  CMD-QSH          DSPW  

In case you missed it, here are two older blog posts on how the underlying support for the QINACTITV system value changed back in the 7.1 release.

IBM Improves the Handling of the Inactivity Timeout
More Changes for the Handling of QINACTITV

I’d like to thank Mike Russell of the IBM i work management development team for coming up with this creative solution in the 7.3 release and his assistance with this post.

This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.