Previous Topic: Adding or Deleting a SetNext Topic: Adding and Dropping Set Pointers


Changing Set Mode

Types of changes

You can change the mode of a set from chain to index or vice versa.

What components are affected

The schema set definition and data are affected. All subschemas and access modules that reference either the owner or member records are also affected.

Steps to change from chained to indexed

To change a chained set to an indexed set when data has been loaded:

  1. Create a new schema based on the original schema
  2. Modify the set in the new schema to change the set mode
  3. Validate the schema
  4. Create a global subschema
  5. Write a program that sweeps the area, walks each set, and calls IDMSTBLU to perform a BUILD function.
  6. Restructure the database if needed to remove old pointer positions and add new ones.
  7. Execute MAINTAIN INDEX from SORT3 using the output from step 5 as input
  8. Complete the change by updating the original schema, regenerating affected subschemas, and altering affected access modules.

Steps to change from indexed to chained

To change an indexed set to a chained set when data has been loaded:

  1. Create a new schema based on the original schema
  2. Modify the set in the new schema to change the set mode
  3. Validate the schema
  4. Create a global subschema
  5. Write a program that sweeps the area and calls IDMSTBLU to perform a DELETE function and also produces a work file for input to step 8.
  6. Use the output generated by IDMSTBLU as input to MAINTAIN INDEX and run it from SORT3 to delete each index occurrence
  7. Restructure the database as needed to remove old pointers positions and add new ones
  8. Sort the workfile produced by IDMSTBLU by owner key, member symbolic key, or set position.
  9. Write a program to:
    1. Read the sorted output
    2. Obtain owner by db-key
    3. Obtain member by db-key
    4. Connect the member to the set
  10. Complete the change by updating the original schema, regenerating affected subschemas, and altering affected access modules.

Considerations for the change from indexed to chained