

Modifying Schema Entities › Set Modifications › Changing Set Mode
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:
- Create a new schema based on the original schema
- Modify the set in the new schema to change the set mode
- Validate the schema
- Create a global subschema
- Write a program that sweeps the area, walks each set, and calls IDMSTBLU to perform a BUILD function.
- Restructure the database if needed to remove old pointer positions and add new ones.
- Execute MAINTAIN INDEX from SORT3 using the output from step 5 as input
- 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:
- Create a new schema based on the original schema
- Modify the set in the new schema to change the set mode
- Validate the schema
- Create a global subschema
- 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.
- Use the output generated by IDMSTBLU as input to MAINTAIN INDEX and run it from SORT3 to delete each index occurrence
- Restructure the database as needed to remove old pointers positions and add new ones
- Sort the workfile produced by IDMSTBLU by owner key, member symbolic key, or set position.
- Write a program to:
- Read the sorted output
- Obtain owner by db-key
- Obtain member by db-key
- Connect the member to the set
- Complete the change by updating the original schema, regenerating affected subschemas, and altering affected access modules.
Considerations for the change from indexed to chained
- When you submit the RESTRUCTURE utility statement to initialize pointers (and possibly to delete pointers), you must initialize all existing pointer positions in the owner and member records that will be re-used for the chained set. If this is not done, you will be unable to connect the members to their owners in Step 9.
- The work file produced in Step 5 should contain the following information:
- The dbkey of each owner record occurrence
- The dbkey of each member record occurrence
- The position of each member record with the set (if its necessary to maintain the same set order)
- The sort key of the member record within the set (if the set order is changing or the order of duplicates does not have to be maintained)
Copyright © 2014 CA.
All rights reserved.
 
|
|