Toolkit for adapting existing implementations


This topic contain best practices for adapting source listing repositories in your enterprise:


Using an existing source DDIO

If you have one or more existing source DDIO files that you want to use in these best practices, you can convert them to databases attached to the appropriate source shared directories. If you need to rename them, do that first.

Before converting a DDIO file to a database, verify that the AUTODELETE attribute is DUPS. You can use the CSS Utilities ISPF Menu to check the AUTODELETE option. If it is not DUPS, then change it before converting. For information about using CSS Utilities, see CSS-utilities.

After converting a DDIO file to a database, verify that it is allocated and formatted optimally by using the DDIO Calculator (see Using DDIOCALC). Check the following items:

  • Check that the CISIZE is 18432 (third-track blocking).
  • Check that the groupcount is a multiple of 3.
  • Compare the Largest Member to Max. If these numbers are equal, you will need to reallocate with a larger groupcount.

To change any of these items reallocate them to the database. For more information, see Reallocating a database.

Detaching a database

The DETACH command disconnects a database from a shared directory and removes the database entries from the shared directory. You must detach the databases to reallocate or rename a database or shared directory. We used CSS Utilities to generate the following example:

//DETACH   EXEC PGM=CWDDALLU                             
//ABNLREPT DD SYSOUT=*                                   
//CWUT0001 DD DISP=SHR,DSN=COMPWARE.PROD.SDB.S0000001    
//CWUT0002 DD DISP=SHR,DSN=COMPWARE.PROD.SSD             
//ABNLPARM DD *                                          
DETACH DIRDD=CWUT0002,                                   
       DDNAME=CWUT0001

Renaming a DDIO file, database, or shared directory

Before renaming a database, you must detach it from its shared directory. After renaming, attach it to the shared directory to retain the correct references. You must attach the newly renamed databases to the shared directory before you can use it (them).
Before renaming a shared directory, you must first detach all of its databases. Then reattach all of the databases to the newly renamed shared directory.

Warning
  • Before renaming a database, detach it from the shared directory.
  • Before renaming a shared directory, detach all of its databases.

Rename a VSAM file

We used File-AID/MVS to generate the following example:

//RENAME EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
ALTER -
COMPWARE.CW.AA.R123.AA01VS01.CWPDDIO -
NEWNAME(COMPWARE.TEST.SDB.S0000001)
ALTER -
COMPWARE.CW.AA.R123.AA01VS01.CWPDDIO.DATA -
NEWNAME(COMPWARE.TEST.SDB.S0000001.DATA)
/*

Changing AUTODELETE options on a database

You can use the CHANGE command to change the AUTODELETE attribute of a database. For best practices, we recommend AUTODELETE=DUPS. CSS requires it to specify DUPMAX=1 on the shared directory, which ensures that CSS will hold only the latest version (compile date) of each program and does not automatically delete any.

We used the CSS Utilities to generate the following example:

//CHANGE   EXEC PGM=CWDDALLU                         
//ABNLREPT DD SYSOUT=*                               
//CWUT0001 DD DISP=SHR,DSN=COMPWARE.PROD.SDB.S0000001
//ABNLPARM DD *                                      
CHANGE OBJECT=DATABASE,                              
       AD=DUPS,                                      
       DDNAME=CWUT0001

Changing or setting DUPMAX on shared directory

You can use the CHANGE command to change or set the DUPMAX source duplicate-control parameter in the shared directory. For best practices, we recommend DUPMAX=1. It ensures that CSS holds only the latest version of each listing and does not automatically delete any.

We used CSS Utilities to generate the following example:

//CHANGE   EXEC PGM=CWDDALLU                         
//CWUT0001 DD DISP=SHR,DSN=COMPWARE.TEST.SSD                    
//ABNLPARM DD *                                                 
CHANGE OBJECT=SRCEDIR,                                          
       DUPMAX=1,                                  DUPMAX SETTING
       DDNAME=CWUT0001                                          
REFRESH OBJECT=SRCEDIR,                                         
        DUPMAX=1,                                 DUPMAX SETTING
        DIRDD=CWUT0001

Adding a DBMODEL

CSS stores the DBMODEL in the shared directory. It is a template for automatically allocating additional databases when required. For more details, see Resolving a DDIO File Full Condition in BMC AMI Common Shared Services User Reference. For best practices, we recommend using a DBMODEL and DDIOCALC to determine its optimal size. Then, using information from DDIOCALC, you can set the allocation parameters in your DBMODEL. For more information about using DDIOCALC, see Using DDIOCALC. For a JCL example, see Create the DBMODEL.

Reallocating a database

You might need to reallocate a database to change attributes such as report count, groupcount, or CISIZE. However, if you use a DBMODEL, you should not need to reallocate a database to add more space.

Perform the following steps to reallocate a database:

  1. Export the members. We used CSS Utilities to generate the following example:

    //EXPORT   EXEC PGM=CWDDALLU,REGION=1024K         
    //ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.SSD      
    //ABNLTO   DD DSN=COMPWARE.TEST.SSD.EXPORT,       
    //            DISP=(,CATLG,DELETE),               
    //            UNIT=SYSDA,SPACE=(CYL,(30,15),RLSE),
    //            DCB=(LRECL=80,BLKSIZE=0)            
    //ABNLREPT DD  SYSOUT=*                           
    //SYSUDUMP DD  SYSOUT=*                           
    //ABNLPARM DD  *                                  
       EXPORT TODD=ABNLTO,FROMDD=ABNLFROM             

    /*

2. Detach it from the shared directory. See Detaching a database.

3. (Optional) Rename the old database. See Renaming a DDIO file, database, or Shared directory.

4. Create the new database. See Create the initial database.

5. Import the members into the new database.

//STEP3B   EXEC PGM=CWDDALLU,REGION=1024K      
//ABNLREPT DD  SYSOUT=*                        
//SYSUDUMP DD  SYSOUT=*                        
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.EXPORT
//ABNLTO   DD DISP=SHR,DSN=COMPWARE.QA.SSD     
//ABNLPARM DD  *                               
   IMPORT

Exporting a single member

To export a single member, run the following JCL:

//EXPORT   EXEC PGM=CWDDALLU,REGION=1024K         
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.SSD      
//ABNLTO   DD DSN=COMPWARE.TEST.SSD.EXPORT,       
//            DISP=(,CATLG,DELETE),               
//            UNIT=SYSDA,SPACE=(CYL,(30,15),RLSE),
//            DCB=(LRECL=80,BLKSIZE=0)            
//ABNLREPT DD  SYSOUT=*                           
//SYSUDUMP DD  SYSOUT=*                           
//ABNLPARM DD  *                                  
EXPORT TODD=ABNLTO,   
    PROGRAM=member,   
    FROMDD=ABNLFROM
/*

Deleting a single member

To delete a single member, run the following JCL:

//CSSDEL   EXEC PGM=CWDDALLU,REGION=1024K         
//ABNLFROM DD DISP=SHR,DSN=COMPWARE.TEST.SSD      
//ABNLREPT DD  SYSOUT=*                           
//SYSUDUMP DD  SYSOUT=*                           
//ABNLPARM DD  *                                  
DELETE OBJECT=ENTRY,DIRDD=ABNLFROM,
       PROGRAM=CWXTCOB
/*

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*