Previous Topic: How to Expand the Employee Demo Database With Mixed Page Group Index SetsNext Topic: Move the EMPDEMO.INS-DEMO-REGION


Convert the EMP-COVERAGE Chain Set to an Index Set

In CA IDMS releases before Release 18.5, the MPG feature does not support referential sets that cross page group boundaries. However, you can now convert a chain set to a user-owned index set so you can use it with the MPGI feature enhancement. The MPGI feature enhancement allows you to have index sets that cross page group boundaries, opening up additional space for database growth.

When expanding the employee demo database as outlined in this document, you must convert the EMP-COVERAGE set from a chain set to a user-owned index set.

Follow these steps:

  1. Modify your schema definitions for record and set changes.
    1. Create a new version of your schema based on the current schema. To get the source of your current schema you can punch it to a data set member using IDMSCHEM.
    2. Once you have access to the source, convert the set mode of the EMP-COVERAGE set from chained set to user-owned indexed set. Update to a new version number. Leave the set name the same.
            SET NAME IS EMP-COVERAGE      
                ORDER IS FIRST            
                MODE IS CHAIN            
      

      becomes

            SET NAME IS EMP-COVERAGE      
                ORDER IS FIRST            
                MODE IS INDEX BLOCK CONTAINS 40 KEYS              
      
    3. Validate the new schema by adding ‘Validate.’ at the bottom of the schema.

    Note: For more information about compiling a schema, see the chapters 9 & 10 in the CA IDMS Database Administration Guide.

  2. Create a new subschema for the implementation. Change the name of the subschema. The schema it references requires the updated version number you updated in an earlier step. In order to create a new subschema you can use IDMSUBSC to punch out a copy of your current subschema and load up a new version into your dictionaries.

    Note: For more information about compiling a subschema, see the chapters 9 & 10 in the CA IDMS Database Administration Guide.

  3. Write and execute a program that sweeps the area for each EMPLOYEE record, walks each EMP-COVERAGE set, and calls IDMSTBLU to perform a BUILD function. This program generates the input for Maintain index.

    //RELDCTL DD DSN=user.reldctl,DISP=(NEW,CATLG),UNIT=nnnn,
    // VOL=SER=nnnnnn,

    //SYS002 DD DSN= user.dbl002,DISP=(NEW,CATLG),
    // UNIT= tape002,SPACE=(TRK,1)

    //SYSPCH DD DSN=&&sort,DISP=(NEW,PASS),UNIT=disk,
    // SPACE=(TRK,1),DCB=BLKSIZE=80

    Note: Use the SYSPCH, SYS002, and RELDCTL work files that IDMSTBLU generates as input to the MAINTAIN INDEX utility (Step 6) SYS001, SYS003, and RELDCTL respectively.

    Note: For a sample program, see Appendix A: Sample Program to Call IDMSTBLU BUILD Function.

  4. Run IDMSRSTC to produce the IDMSRSTT macros and assemble and link the IDMSRSTT module. These items are used as input for the Restructure step.

    OLD SCHEMA NAME IS old-schema

    NEW SCHEMA NAME IS new-schema.

    Note: For more information about the IDMSRSTC program, see the CA IDMS Utilities Guide: Chapter 6 for general information and Chapter 7 for JCL examples.

    For more information about the IDMSRSTT macro, see the CA IDMS Utilities Guide: Appendix B for general information and Chapter 7 for sample JCL.

  5. Use the RESTRUCTURE utility on the affected areas to remove old pointer positions and add new ones.

    RESTRUCTURE SEGMENT EMPDEMO USING old-ssc RSTTMOD IDMSRSTT;

    Note: For information about the Restructure Utility, see Chapter 5 in the CA IDMS Utilities Guide. For sample JCL, see Chapter 7 in the CA IDMS Utilities Guide.

  6. Execute MAINTAIN INDEX from SORT3.

    MAINTAIN INDEX IN SEGMENT EMPDEMO USING new-ssc FROM SORT3 ;

    Note: Use the SYSPCH, SYS002, and RELDCTL work files that IDMSTBLU generates as input to the MAINTAIN INDEX utility as SYS001, SYS003, and RELDCTL respectively. To see the full JCL for this step, see Chapter 7 in the CA IDMS Utilities Guide. For additional information about Maintain Index, see Chapter 5 in the CA IDMS Utilities Guide.

  7. Test your applications using the test schema and subschema to verify that you can navigate the new sets and that they are populated correctly.
  8. Update the original schema and subschema with the test versions.

    The conversion of the chain set to a user-owned index set is complete.