CA TPX Session Management for z/OS

Tuesday Tip: How to get a list of TPX Users having not logged on to TPX for a log time.

  • 1.  Tuesday Tip: How to get a list of TPX Users having not logged on to TPX for a log time.

    Posted 09-04-2014 03:26 AM

    This job lists all users together with their last logon date:

     

    //jobcard

    //*                                       

    //BATCHADM EXEC name_of_tpx,VNODE='*BATCH*'

    //EXTFILE  DD   DSN='aaa.bbb.ccc',DISP=SHR

    //RPTFILE  DD   SYSOUT=*                  

    //SYSIN    DD   *                         

    C ----------------------------------------------------------    

    C THIS SAMPLE TPX BATCH ADMINISTRATION JOB REPORTS ALL USERS    

    C OF TPX WITH THEIR LAST LOGON DATE

    C ----------------------------------------------------------    

    EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (VUSRDACC(--------))

    SET RTITLE1 '1USERNAME LAST LOGON'                              

    SET RTITLE2 ' -------- ----------'                              

    REPORT GIVING(RPTFILE) USING (EXTFILE)                          

      (                                                             

    (' &UIDXNAME' '&VUSRDACC')                                     

      )                                                             

    //

     

    The list looks like this (If you want to have the list written into a dataset, you can specify that in DD-card RPTFILE instead of SYSOUT=*):

     

     

    USERNAME LAST LOGON

    -------- ----------

    ERWIN    07/10/14

    FRITZ    10/17/11

    MEYER    01/26/12

    NVIADMIN 03/20/03

    PETER    10/30/14

    STEVE    05/22/12

    STXADMIN 09/04/92

    TIERTEST 09/09/11

    TPXADMIN 10/17/14

    TPXUSER1 10/10/89

    TPXUSER2 10/09/89

    TPX1     09/09/14

     

    If you want to get the list of users having logged on in 2010 the last time then change the EXTRACT-Line as follows

     

    EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (VUSRDACC(------10))

     

    If you want to get the list of users having logged on between 2000 and 2009 the last time then change the EXTRACT-Line as follows:

     

    EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (VUSRDACC(------0-))

     

    If you want to get the list of users having logged on 2012 or 2013 then change the EXTRACT-Line as follows:

     

    EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (VUSRDACC(------12) VUSRDACC(------13))

     

    In this case the line is more than 80 bytes long. As there is no continuation character for TPXBATCH write the complete SYSIN into a dataset long enough and specify that dataset in the SYSIN-card.