Modify QINACTITV to a limited number of users

370 pts.
Tags:
IBM iSeries
QINACTITV
V5R3
WRKSYSVAL
Sir, how do you configure a limited number of users where the objective is that the session of these users will not automatically sign-off. Because the way i understand it, this is done using WRKSYSVAL SYSVAL(QINACTITV) but this approach will affect all users and this is not what i intend to do. i only want to change the inactive job time-out of 7 users to *NONE. The existing time out interval set by our security admin is 15 minutes which applies to all users of AS400 in our company. How do you set aside the 7 users so that their Time out interval will be *NONE? Thanks.

Software/Hardware used:
i-series model 820 OS V5R3

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe that is a system value and your cannot just exclude selected users.
If you are concerned about people not signing off when they leave at EOD, you can have a program schedule to run @ EOD to change the value and then reset it back the next morning.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    There are two related system values -- QINACTITV sets the inactivity timer threshold (the interval) and QINACTMSGQ determines the action to take when a workstation is reported to be inactive beyond the interval. You would create some message queue, e.g., QGPL/INACTJOB, and set the QINACTMSGQ system value to point to that message queue. Once that's done, any workstation that is inactive beyond the interval in QINACTITV will cause a CPI1126 message to be sent to that message queue. No other action will be taken by the system for that inactive job. You then write (or obtain) a program that receives messages from that message queue. The program decides what to do about each message. The program might check the user ID against a list of users to see if that user's jobs should be ended or not. You can have the program work any way that you want. Maybe the program disconnects some users, ends the jobs of other users, sends warning messages for still other users and ignores the rest. Maybe the program puts the job on hold if it's running from an important device. If you have lists of users or device names or job names in files, you can add or remove the records any time you choose to update the files. You might have records that specify different times of the day or days of the week when inactivity can be ignored. The message queue option is provided so that you can have inactivity be handled any way you want. Tom
    125,585 pointsBadges:
    report
  • danmd5systemad
    Sir Tom: "You would create some message queue, e.g., QGPL/INACTJOB, and set the QINACTMSGQ system value to point to that message queue." Sir, i haven't done this before and would greatly appreciate if you would give me some simple tips/lecture through this forum on doing this. "You then write (or obtain) a program that receives messages from that message queue." Sir, since i'm a system administrator here at our company, i am not well verse and have very limited background in writing a simple program to cater to this issue in AS/400. you can probably share some sample,basic one's, in doing this. in this way, i can develop and further enchance my role as system administrator. Thanks and best regards.
    370 pointsBadges:
    report
  • Rayj1031
    following is a program modified from an IBM example that has been running since 2002.
    /********************************************************************/
    /* PROGRAM NAME . . . . . . . . . . . . . . :   LOGOFF              */
    /* AUTHOR . . . . . . . . . . . . . . . . . :   RAYMOND G. JOHNSON  */
    /* DATE CREATED . . . . . . . . . . . . . . :   01/16/2002          */
    /*                                                                  */
    /* PROGRAM INFORMATION:  LOGOFF INACTIVE USERS                      */
    /********************************************************************/
    
    /********************************************************************/
    PGM
    
    
       DCL        VAR(&MSGDTA)    TYPE(*CHAR) LEN(80)
       DCL        VAR(&MSGID)     TYPE(*CHAR) LEN(7)
    
       DCL &THEQUEUE   *CHAR 20         /* QINACTMSGQ SYSTEM VALUE     */
       DCL &INACTLIB   *CHAR 10         /* QUEUE'S LIBRARY             */
       DCL &INACTQUEUE *CHAR 10         /* QUEUE NAME                  */
       DCL &INACTDATA  *CHAR 100        /* RAW MESSAGE DATA            */
       DCL &JOBNAME    *CHAR 10         /* INACTIVE JOB NAME           */
       DCL &USER       *CHAR 10         /* INACTIVE JOB USER           */
       DCL &NUMBER     *CHAR 6          /* INACTIVE JOB NUMBER         */
       DCL &TIME       *CHAR 6          /* TIME OF DAY                 */
       DCL &TIME2      *CHAR 8          /* FORMATTED TIME OF DAY       */
       DCL &MSGDTALEN  *DEC (5 0)       /* Message Length              */
       DCL &MSGID      *CHAR 7          /* MESSAGE TAKEN FROM THE QUEUE*/
    
    /********************************************************************/
    /*           GLOBAL MONITOR MESSAGE - STANDARD ERROR EXIT           */
    /********************************************************************/
    
                 MONMSG     MSGID(CPF0000 MCH0000) EXEC(GOTO CMDLBL(ERROR))
    
    /********************************************************************/
    /*           start of program                                       */
    /********************************************************************/
    
    /****************************************************************************/
    /* GET THE NAME OF THE QUEUE TO MONITOR FROM THE SYSTEM VALUE               */
    /****************************************************************************/
    
       RTVSYSVAL  SYSVAL(QINACTMSGQ) RTNVAR(&THEQUEUE)
       CHGVAR &INACTQUEUE %SUBSTRING(&THEQUEUE 1  10)
       CHGVAR &INACTLIB   %SUBSTRING(&THEQUEUE 11 10)
    
    /****************************************************************************/
    /* MAIN LOOP.                                                               */
    /****************************************************************************/
    
       LOOP:
    
        /*                                                            */
        /* WAIT FOR MESSAGE ON THE MESSAGE QUEUE                      */
        /*                                                            */
    
         RCVMSG     MSGQ(&INACTLIB/&INACTQUEUE) WAIT(*MAX) +
                     MSGDTA(&INACTDATA) MSGDTALEN(&MSGDTALEN) +
                     MSGID(&MSGID)
    
        /*                                                            */
        /* CHECK TO SEE IF IT IS THE RIGHT MESSAGE, IF NOT, SKIP IT.  */
        /*                                                            */
    
          IF         (&MSGID *NE 'CPI1126') THEN(GOTO SKIP)
    
        /*                                                            */
        /* Retrieve job information.                                  */
        /*                                                            */
    
    CHGVAR &JOBNAME %SUBSTRING(&INACTDATA 1 10)   /* GET JOB NAME     */
    CHGVAR &USER    %SUBSTRING(&INACTDATA 11 10)  /* GET USER NAME    */
    CHGVAR &NUMBER  %SUBSTRING(&INACTDATA 21 6)   /* GET JOB NUMBER   */
    
    /****************************************************************************/
    /* Special users that do not get signed off                                 */
    /****************************************************************************/
    
    IF COND(&USER *EQ 'user profile ') THEN(GOTO CMDLBL(SKIP)) /* User xxx  */
    
    /****************************************************************************/
    /* Special devices that do not get signed off                               */
    /****************************************************************************/
    
    IF COND(&JOBNAME *EQ 'Z1        ') THEN(GOTO CMDLBL(SKIP))    /* CONSOLE */
    
    
    /****************************************************************************/
    /* Default Action                                                           */
    /****************************************************************************/
    
             RTVSYSVAL  SYSVAL(QTIME) RTNVAR(&TIME)       /* Get the time.      */
    
             CHGVAR     VAR(&TIME2) VALUE(%SST(&TIME 1 2) *TCAT ':' *TCAT +
                          %SST(&TIME 3 2) *TCAT ':' *TCAT %SST(&TIME 5 2))
    
             ENDJOB     JOB(&NUMBER/&USER/&JOBNAME)
             MONMSG     MSGID(CPF1300) EXEC(GOTO CMDLBL(SKIP)) /* Job ended  */
             MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(MSG))
    
     MSG:    SNDMSG     MSG('User' *BCAT &USER *BCAT 'was logged off from +
                          device' *BCAT &JOBNAME *BCAT 'at' *BCAT &TIME2) +
                          TOMSGQ(QUSRSYS/LOGOFFLOG)
                              /* log all logoff actions for auditor*/
    
    /****************************************************************************/
    /* End of loop.                                                             */
    /****************************************************************************/
    
     SKIP:       GOTO       CMDLBL(LOOP) /* GO GET MORE MESSAGES ABOUT +
                              OTHER TERMINALS */
    
    
    /********************************************************************/
    /*           END OF PROGRAM / ERROR EXIT                            */
    /********************************************************************/
    ERROR:      RCVMSG     MSGTYPE(*EXCP)  MSGDTA(&MSGDTA) +
                             MSGID(&MSGID)
                MONMSG     MSGID(CPF0000)
                SNDPGMMSG  MSGID(&MSGID) MSGF(QCPFMSG) MSGDTA(&MSGDTA) +
                             MSGTYPE(*ESCAPE)
                MONMSG     MSGID(CPF0000)
    END:        ENDPGM
             ENDPGM 
    *************************** This program has worked since 2002. Requires the system values to be set appropriately. requires the existence of two message queues: 1. - TOMSGQ(QUSRSYS/LOGOFFLOG) - this is just used to keep a log of all the people that are logged off each day. This step is not necessary. 2- The message queue specified in the system value QINACTMSGQ must exist. My program above actually pulls the name of the message queue from the system value so if anyone changes the message queue, the program still works.
    335 pointsBadges:
    report
  • danmd5systemad
    [...] CharlieBrowne, TomLiotta, and Rayj1031sort out the details of modifying QINACTITV to a limited number of users. 6. Share your own thoughts on one of our recent Open IT Forum questions or just see what [...]
    0 pointsBadges:
    report
  • dave80439
    http://www-01.ibm.com/support/docview.wss?uid=nas8N1016268
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following