search cancel

Recommended procedure to REORG TPX VSAM ADMIN1/ADMIN2 databases

book

Article ID: 229752

calendar_today

Updated On:

Products

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 (REORG).


Business requirements often limit the amount of time that TPX can be unavailable, hence to minimize the down time, these instructions identify what steps can be taken to process a TPX database REORG.


TPX needs to be down when running IDCAMS for backup, Rename and the TPX RESET INTEGRITY job.

Suggest attempting this procedure during a time of low system activity.

 

Environment

Release : 5.4

Component : TPX for z/OS

Resolution

TPX needs to be quiesced for the entire sequence of the REORG in order to maintain the integrity of the current data.

A -  Process flow:

    Stop TPX.

     IDCAMS REPRO the 'DATA ' , component to a flat file. (The 'DATA ' only is required so the Index is rebuilt when the sorted flat file is repro'd to the new vsam).

          Example: hilvl.CB0VJCL(VBACKUP) or LSBACKUP if the TPX files are managed by Lserv.


     IDCAMS VSAM REPRO (UNLOAD) tries to create flat file in sequence.
          
                 Example:  TPX.PROD.ADMIN2.DATA to TPX.PROD.ADMIN2.NEW.FLATFILE
                                    ensure 50% free space

   -   Sort the new flat file.
       Since the records are unloaded in non-sequenced order, they need to be sorted.  

       This becomes imperative if: 

          -  An issue has been identified with VSAM files.
          -  or the VSAM files need to be reorg (too many CA splits or extensions) 
          -  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=B

   -   Define a new ADMIN2 VSAM file.
              Example:  TPX.PROD.ADMIN2.NEW

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

B - Complete the process

    -  IDCAMS RENAME
           1) RENAME TPX.PROD.ADMIN2 to TPX.PROD.ADMIN2.OLD
           2) RENAME TPX.PROD.ADMIN2.NEW to TPX.PROD.ADMIN2

     -  Run RESET INTEGRITY – Verify RC=0  - the sample batch job is available in - hilvl.CB0VSRC(BATCHINI)
     -  Start TPX.

Verify TPX is working as expected.  If for any reason the changes need to be backed out, reverse the
IDCAMS RENAME to reinstate the original file. Run RESET INTEGRITY, before restarting TPX
.

Note: Use ONLY IDCAMS to implement the above steps.  
         This Knowledge article is specific to ADMIN1 and ADMIN2 TPX VSAM DATABASE REORG.
         TPX Users and Profiles are maintained in the ADMIN2 database.
         See Article 229806
on how to REORG the Notes / View / Mail TPX VSAM databases.

 

 

 

Additional Information

Please refer to the following for more information:

Under Best Practices, Performance and Maintenance.

   Regular VSAM Maintenance for CA TPX Session Management VSAM Files

   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?