Two ways to rename CA Datacom database files

book

Article ID: 144564

calendar_today

Updated On:

Products

CA Datacom CA Datacom - AD CA Datacom/DB CA Datacom/AD

Issue/Introduction

This article is in English. For the Spanish-language version, please see Knowledge Base article 144576.
Este artículo está en inglés. Para la versión en español, consulte el artículo 144576 de Knowledge Base.

There have been multiple articles written about how to make a single change to the filenames for CA Datacom databases. While these articles are worthwhile for a single change, there might be a need to rename two or more different sets of database files, or to rename the CXX, LXX, and FXX files with the database files.

This article will explain two different methods available and provides a process to make one or multiple changes in a single JCL stream. To use this process, download the attached file, upload the tersed file from your PC to the mainframe as a BINary file, FB, LRECL=1024, BLKSIZE=27648. Here is JCL you can use to recreate the PDS from the uploaded tersed file:
//*
// SET TERSFL=<<Your downloaded tersed file (attached below)
// SET OUTPDS=<<A New PDS filename for this utility
//*
//DELETE   EXEC PGM=IEFBR14
//X01      DD  DSN=&OUTPDS,
//             DISP=(MOD,DELETE,DELETE),UNIT=3390,SPACE=(TRK,1)
//* - - - - - -C- - - - - - - - - - - - - - - - - - - - - - - - - - -7-
//UNTERSE  EXEC PGM=AMATERSE,PARM=UNPACK
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=SHR,DSN=&TERSFL
//SYSUT2   DD  DISP=(NEW,CATLG,DELETE),DSN=&OUTPDS,
//             UNIT=3390,STORCLAS=TSO,DSORG=PO,SPACE=(CYL,(1,1,5),RLSE)
//*

Environment

Component : CA Datacom/AD

Component : CA Datacom/DB

Resolution

When making changes to database names, whether to change the prefix of the file, or to rename the file to conform to a new standard, there are several ways to accomplish this.
  1. If only a select group of database files is being changed, you can use the DBUTLTY CXXMAINT function, combined with an IDCAMS ALTER command. This allows you to make the change while the MUF is up, and only the application needs to be stopped. Also, this only applies to databases that are not opened automatically when the MUF starts (currently DB 6, 17, and 1007).
  2. If changing DB 6, 17, or 1007, it is necessary to recycle the MUF using special settings in the MUF Startup Options, and then you can run the CXXMAINT function as above. In this case, though, the next option might be better.
  3. If changing one of these special databases, or if you need to also change the CXX, LXX, or FXX, you can use the DBUTLTY CXXCLONE function and the IDCAMS ALTER command. To use this function, you will need to shut down the MUF for a brief time, as you will create a new CXX containing the changed filenames.
In either case, whether using the CXXMAINT or CXXCLONE process, you will run the first job $01SQLRP, and you will identify the "from" and "to" filename strings you want to change. You can specify multiple change pairs, but the first one that matches a current DSN is the one that is used. This job will run an SQL query to capture the current CXX filenames, and then a REXX program will generate all the DBUTLTY and IDCAMS control statements to make the changes. Additionally, this job will create control statements to reverse the changes and put the system back to its original state.

Note that there is a member called $$NOTES in the PDS created above with more details, and there are specific usage notes in each job.

Here are the other members in the PDS created above, and what they do:
$02CLON1 Runs CXXCLONE to change files from the "From" string to the "To" string  
$02CLON2 SQL report and compare job to confirm the changes
$02CLON3 Job to restore the original CXX file
$02CLON4 SQL report and compare job to confirm the filenames are restored
$03CMNT1 Part 1 of 2 - CXXMAINT to change filenames in the CXX
$03CMNT2 Part 2 of 2 - IDCAMS Alter to change filenames in the z/OS catalog
$03CMNT3 SQL report and compare job to confirm the changes
$03CMNT4 Part 1 of 2 - CXXMAINT to restore original filenames in the CXX
$03CMNT5 Part 2 of 2 - IDCAMS Alter to restore the original filenames in the z/OS Catalog
$03CMNT6 SQL report and compare job to confirm the filenames are restored

 

We are hopeful that this article and the $$NOTES member will help you easily and successfully rename the database files.

Additional Information

As always, please contact Broadcom support for CA Datacom if you have further questions.

Attachments

1581002894395__DBRENAME Tersed.trs get_app