Recommended procedure to REORG TPX VSAM databases.

book

Article ID: 32075

calendar_today

Updated On:

Products

CA TPX - Session Management TPX- PACKAGE CA Vman Session Management for z/OS TPX SESSION MANAGEMENT

Issue/Introduction

When there have been significant changes to the TPX VSAM files, such as adding a large number of new users, or if data problems have been identified
then it is best to reorganize the VSAM files (sometimes simply referred to as a REORG).

Business requirements often limit the amount of time that TPX can be unavailable, so to minimize this down time these instructions identify what steps can be taken while TPX is still running.

The only time that TPX needs to be down is for the IDCAMS RENAME and RESET INTEGRITY which are both extremely quick to execute.
This should be done during a time of low activity.

Environment

Release: TPX 5.4
Component: TPX Z/OS

Resolution

To minimize downtime of TPX during backup and restore of TPX VSAM files, you can follow these steps.  

1   IDCAMS REPRO the DATA 'only', component to a new file.
     IDCAMS VSAM REPRO (UNLOAD ) tries to create flat file in sequence.
          
          TPX must be stopped for backup (Unload) or records may go missing.

        Example:  TPX.PROD.ADMIN2.DATA to TPX.PROD.ADMIN2.NEW.FLATFILE
        ensure 50% freespace

2   Sort the new flat file. Unload requires the records to be sorted, since they are not unloaded in record sequence order.
    The need to sort the records becomes imperative if: 

    A) There is an issue with VSAM files.
    B) or the VSAM files need to be reorg (too many CA splits or extensions) 
    C) or used utility other than IDCAMS REPRO (UNLOAD) to create the flat file backup. 

        Sort starting at position 9 for a length of 17 in ascending order
        DFSORT example:  SORT FIELDS=(9,17,A),FORMAT=BI

3   Define new VSAM file.
        Example:  TPX.PROD.ADMIN2.NEW

4   IDCAMS REPRO sorted flat file to temporary VSAM file.
        Example:  TPX.PROD.ADMIN2.NEW.FLATFILE to TPX.PROD.ADMIN2.NEW

5   Stop TPX

6   IDCAMS RENAME. 
       A) RENAME TPX.PROD.ADMIN2 to TPX.PROD.ADMIN2.OLD
       B) RENAME TPX.PROD.ADMIN2.NEW to TPX.PROD.ADMIN2

7   Run RESET INTEGRITY using TPX batch job.
        see sample member BATCHINI
       
8   Start TPX.

9   Verify TPX is working as expected.  
    If not, then reverse the IDCAMS RENAME to reinstate the original file and run RESET INTEGRITY. 

Note: Use ONLY IDCAMs to implement the above steps.  
Expand all of the above steps to include ALL or some TPX VSAM files:

  • Only ADMIN2 comes into play for users and profiles.
  • Only the file(s) having errors would need reorged  (ADMIN1, ADMIN2, MAIL, NOTES, VIEW)

 

Additional Information

How do I keep my CA TPX Session Management related VSAM files in 'healthy' shape?

What are the considerations for running TPX without shutdown for extended periods of time?