Via Batch TPX, how to find and update all sessions that use an ACL called XXXX so it can then be changed to YYYYYY?
This report attempt is extracting on all userids and listing the user session Startup ACL for every userid. This does not make a subsequent update easy to perform.
A better approach is to extract on the specific value then use that extract file as the basis for an update.
Here is an example for finding User Sessions with Startup ACLs that begin with XXXX as well as the UPDATE :
//BATCHADM EXEC TPXPROCNAME,VNODE='*BATCH*'
//EXTFILE DD UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD)
//RPTFILE DD SYSOUT=*
//EXTFIL2 DD UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD)
//RPTFIL2 DD SYSOUT=*
//SYSIN DD *
C
C Three steps:
C 1 - List users and matching sessions with Start ACL = 'XXXX----'
C 2 - Update all matching sessions to YYYYYY
C 3 - List users and sessions with Start ACL = "XXXX" or "YYYYYY"
C
C Can repeat for Term ACL by replacing variable with UENTSCRT
C
EXTRACT GIVING(EXTFILE) USER AND MATCHING SESSIONS (UENTSCRP(XXXX----))
SET RTITLE1
' USERID APPLID START ACL TERM ACL '
SET RTITLE2
' ======== ======== ========= ======== '
REPORT GIVING(RPTFILE) USING(EXTFILE)
(( ' &UIDXNAME' ' &UENTAPPL' ' &UENTSCRP' ' &UENTSCRT' ))
UPDATE USING(EXTFILE) (UENTSCRP(YYYYYY))
EXTRACT GIVING(EXTFIL2) USER AND MATCHING SESSIONS (UENTSCRP(XXXX----))
EXTRACT GIVING(EXTFIL2) USER AND MATCHING SESSIONS (UENTSCRP(YYYYYY--))
SET RTITLE1
' USERID APPLID START ACL TERM ACL '
SET RTITLE2
' ======== ======== ========= ======== '
REPORT GIVING(RPTFIL2) USING(EXTFIL2)
(( ' &UIDXNAME' ' &UENTAPPL' ' &UENTSCRP' ' &UENTSCRT' ))
With this output:
USERID APPLID START ACL TERM ACL
======== ======== ========= ========
USERXA2 applid1 XXXX
USERX02 applid2 XXXXSTRT XXXXTERM
USERID APPLID START ACL TERM ACL
======== ======== ========= ========
USERXA2 applid1 YYYYYY
USERX02 applid2 YYYYYY XXXXTERM
NOTE:
The above example JCL is also included in the attached file.
From TPX 5.4 - Batch Administration - Batch Variables:
User Session Variables for ACL name:
UENTSCRP | Startup ACL | The name of the ACL program that is automatically executed when the user initiates this session. |
UENTSCRT | Termination ACL | The name of the ACL program that is automatically executed when the user inactivates this session. |
Profile Session Variables for ACL name:
PENTSCRP | Startup ACL | The name of the ACL program that is automatically executed when the user initiates this session. |
PENTSCRT | Termination ACL | The name of the ACL program that is automatically executed when the user inactivates this session. |
ACT Variables for ACL name:
ACTACL | Start ACLPGM | The default session activation ACL program used to activate sessions to this application. |
ACTTACL | Termination ACLPGM | Specifies the default session termination ACL program used when sessions to this application are terminated. |