TPX batch - How to list USERs and their associated PROFILEs: examples
search cancel

TPX batch - How to list USERs and their associated PROFILEs: examples

book

Article ID: 22829

calendar_today

Updated On:

Products

Teleview TELEVIEW- PACKAGE TPX - Session Management Vman Session Management for z/OS

Issue/Introduction

 

This document provides several examples on how to code an extract job to list profiles for users.

 

Environment

Release: NVINAM00200-5.3-TPX-Session Management-Access Management package
Component:

Resolution

 This job will list all users and their profiles:

//BATCHADM EXEC TPX,VNODE='*BATCH*'   
//EXTFILE DD UNIT=SYSDA,SPACE=(CYL,(1,1))   
//RPTFILE DD SYSOUT=*   
//*   
//SYSIN DD *   
C   
C List profiles for each user -   
C   
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS   
(UIDXNAME(--------) VUSRPROF(--------))   << All users and their profiles
C SET RTITLE1 ' USERID ' SET RTITLE2 ' 1ST PROF 2ND PROF 3RD PROF 4TH PROF 5TH PROF 6TH PROF 7TH PROF' SET RTITLE3 ' ======== ======== ======== ======== ======== ======== ========' REPORT GIVING(RPTFILE) USING(EXTFILE) ((' ') (' &UIDXNAME ' ) (' &VUSR$PRF '))

 

NOTE: If you have users with more than 7 profiles, you will need to specify a SYSIN dataset with LRECL long enough to accommodate the necessary line length. In addition, see the TPX Batch Administration Guide chapter Using Extract Files for Reporting: Formatting Your Reports - Formatting a Field Longer than 78 Characters.

If you need to filter your report, you can specify one or more values for each variable or use masking. For example:

All users with profile ABCDPROF: 
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS
        (UIDXNAME(--------) VUSRPROF(ABCDPROF))
All users with profile ABCD*: 
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS
        (UIDXNAME(--------) VUSRPROF(ABCD----))
All profiles for users USER001 and USER002: 
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS 
        (UIDXNAME(USER001 USER002) VUSRPROF(--------))

===============
Output example of ALL USERS and their PROFILES

USERID   1ST PROF 2ND PROF 3RD PROF 4TH PROF 5TH PROF
======== ======== ======== ======== ======== ========
AVNEW01  #DEFAULT                                  
AVTEST1  BASEPROF                                  
DCTEST2  TESTPROF BASEPROF                          
DCTEST3  TESTPROF BASEPROF                          
TPADMIN  #DEFAULT                                    
TPXDMIN  #DEFAULT                                    
HAHAA01  #DEFAULT DMVPROF  BASEPROF BASEBKUP        
YXXXX01  BASEPROF                            

Additional Information

See the Batch Administration area in the documentation for detail regarding reports, extacting data and variables.