CA TPX batch - example - How to change any users' sessions with Start ACL XXXX to YYYYYY

Document ID : KB000003907
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Tried unsuccessfully several times to execute a batch TPX to find all sessions that use an ACL called XXXX so it can then be changed to YYYYYY.

Here is what I am using :

EXTRACT GIVING (EXTFILE) USER AND ALL SESSIONS (UIDXNAME(--------))

REPORT GIVING (RPTFILE) USING (EXTFILE) (('&UIDXNAME' '&UENTSCRP'))

Environment:
TPX 5.4
Cause:

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.

Resolution:

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 Startup ACL = 'XXXX----'    C  2 - Update all matching sessions to YYYYYY                          C  3 - List users and sessions with Startup 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                                                  A11ITSO    XXXX                      USERX02                                                  TPXWINDW   XXXXSTRT   XXXXTERM         USERID    APPLID     START ACL  TERM ACL       ========  ========   =========  ========       USERXA2                                                  A11ITSO    YYYYYY                    USERX02                                                  TPXWINDW   YYYYYY     XXXXTERM  

NOTE: 

  1. There are no quotes used with the value for the variables.
  2. Can do the same process for Term ACL by replacing variable UENTSCRP with UENTSCRT in the EXTRACT and UPDATE statements.
  3. Should also run similar reports and updates for profile level and ACT (Application Characteristics) variables (see details in Additional Information).

 

Additional Information:

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:

UENTSCRPStartup ACLThe name of the ACL program that is automatically executed when the user initiates this session.
UENTSCRTTermination ACLThe name of the ACL program that is automatically executed when the user inactivates this session.

Profile Session Variables for ACL name:

PENTSCRPStartup ACLThe name of the ACL program that is automatically executed when the user initiates this session.
PENTSCRTTermination ACLThe name of the ACL program that is automatically executed when the user inactivates this session.

ACT Variables for ACL name:

ACTACLStart ACLPGMThe default session activation ACL program used to activate sessions to this application.
ACTTACLTermination ACLPGMSpecifies the default session termination ACL program used when sessions to this application are terminated.

 

File Attachments:
TEC476758.zip