Recommended procedure to REORG TPX MAIL /NOTES /VIEW VSAM databases
search cancel

Recommended procedure to REORG TPX MAIL /NOTES /VIEW VSAM databases

book

Article ID: 229806

calendar_today

Updated On:

Products

TPX - Session Management

Issue/Introduction

The above-mentioned TPX VSAM databases are sparingly used and hence does not need a frequent REORG.


However, in case of heavy usage due to frequent activity, or if a data problem has been identified, a reorg is recommended. The process is the same as detailed in the Article: 229752 for  the Admin1 and Admin2 VSAM files.

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 'only', 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.%file-name%.DATA to TPX.PROD.%file-name%.NEW.FLATFILE

                                    ensure 50% free space (replace %file-name% with MAIL, NOTES or VIEW)

-   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 MAIL or NOTES or VIEW VSAM file.
              Example:  TPX.PROD.%file-name%.NEW           (Replace %file-name% with appropriate filename)

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

B: Complete the process

     -  IDCAMS RENAME. 
           1) RENAME TPX.PROD. %file-name% to TPX.PROD.%file-name%.OLD
           2) RENAME TPX.PROD. %file-name%.NEW to TPX.PROD.%file-name%

   
     -  Run VSAM Data Sets - RESET INTEGRITY - Verify RC=0  – 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 MAL NOTES & VIEW  TPX VSAM DATABASE REORG.
         See Article 229752 on how to REORG the ADMIN1 & ADMIN2  TPX VSAM databases.

 

Additional Information