TPX batch - example - List all sessions defined to one or more ACTs (Application Characteristic Table)

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

Introduction:

The TPX batch component allows you to report on and update information in the administration database.

Background:

Need a simple report on Applications defined in an Application Characteristics Table

Instructions:

Here are three examples of reports listing all applications in:

  1. one specific ACT (ACTZZ)
  2. any ACT matching a specified mask (ACTZ*)
  3. multiple specific ACTs (ACTZZ and ACTAA)

EXAMPLE 1: Generate a report on all sessions in ACT named ACTZZ

//BATCHADM  EXEC TPX,VNODE='*BATCH*' 
//EXTFILE  DD    UNIT=SYSDA,SPACE=(CYL,(1,1))
//RPTFILE  DD    SYSOUT=*
//*
//SYSIN DD *
C
C  extract from ACT
C
EXTRACT GIVING(EXTFILE) ACT (VACTTBL(ACTZZ))  
SET RTITLE1 ' ACTNAME ACTLABEL ACTSESS VACTTBL' SET RTITLE2 ' ======== =================== ========= ========' REPORT GIVING(RPTFILE) USING (EXTFILE) ((' &ACTNAME' ' &ACTLABEL ' ' &ACTSESS' ' &VACTTBL'))


EXAMPLE 2: Generate a report on all sessions any ACT starting with ACTZ*

//BATCHADM  EXEC TPX,VNODE='*BATCH*' 
//EXTFILE  DD    UNIT=SYSDA,SPACE=(CYL,(1,1))
//RPTFILE  DD    SYSOUT=*
//*
//SYSIN DD *
C
C  extract from ACT
C
EXTRACT GIVING(EXTFILE) ACT (VACTTBL(ACTZ----))                           
SET RTITLE1 ' ACTNAME   ACTLABEL             ACTSESS   VACTTBL'        
SET RTITLE2 ' ========  ===================  ========= ========'       
REPORT GIVING(RPTFILE) USING (EXTFILE)                                 
      ((' &ACTNAME' '  &ACTLABEL          ' '  &ACTSESS' '  &VACTTBL'))

EXAMPLE 3: Generate a report on all sessions in ACT named ACTZZ or ACTAA

  • use a separate EXTRACT statement for each possible value
  • use DISP=MOD on the extract file created
//BATCHADM  EXEC TPX,VNODE='*BATCH*' 
//EXTFILE  DD    UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD)
//RPTFILE  DD    SYSOUT=*
//*
//SYSIN DD *
C
C  extract from ACT
C
EXTRACT GIVING(EXTFILE) ACT (VACTTBL(ACTZZ))
EXTRACT GIVING(EXTFILE) ACT (VACTTBL(ACTAA)) 
SET RTITLE1 ' ACTNAME   ACTLABEL             ACTSESS   VACTTBL'        
SET RTITLE2 ' ========  ===================  ========= ========'       
REPORT GIVING(RPTFILE) USING (EXTFILE)                                 
      ((' &ACTNAME' '  &ACTLABEL          ' '  &ACTSESS' '  &VACTTBL'))

 

NOTE: The above examples can also be found in the attached zip file.

File Attachments:
TEC476646.zip