

Modifying Schema Entities › Record Modifications › Changing the Location Mode of a Record
Changing the Location Mode of a Record
Types of Changes
These are the possible location mode changes for a record in the database:
- CALC to VIA
- CALC to DIRECT
- DIRECT to CALC
- DIRECT to VIA
- VIA to CALC
- VIA to DIRECT
- VIA one set in the schema to VIA another set
What components are affected
The record definition and the data are affected. Subschemas and access modules referencing the record are also affected.
Steps to change the location mode
To change the location mode of a schema record where data has been loaded:
- Add a new schema based on the original schema
- Modify the record in the new schema to specify the new location mode
- Validate the schema
- Create a new global subschema
- Unload and reload the database
- Complete the process by updating the original schema, regenerating affected subschemas, and altering affected access modules.
Considerations
- If the storage mode is being changed to VIA:
- If the set does not exist, take the following actions before unloading and reloading the data:
- Add the set to the schema and subschemas
- Write a program to connect the members to the appropriate owner occurrence
- Unload and reload the data using either the REORG or the UNLOAD/RELOAD utilities.
- If the REORG utility is used, the unload phase takes additional time to retrieve the member records because it does so by walking the new (non-clustering) VIA set
- If UNLOAD/RELOAD are used, you must do one of the following:
- Either unload and reload the data a second time in order to cluster the member records correctly
- Use an intermediate subschema to unload the data. The intermediate subschema must describe the original database except that the member record is VIA the new set. Using this technique results in longer unload times because the member records are retrieved by walking the new (non-clustering) VIA set.
- If the storage mode is being changed to CALC, see 33.5.3, "Changing a Record's CALC Key" for considerations on doing this.
- If the storage mode is being changed to DIRECT:
- You must unload and reload the data if the original location mode was CALC but not if it was VIA.
- The record is reloaded into the same page if the page is within the record's target page range. If the old page is not part of the target page range, the record is stored in its target range proportionally to its position in its original range. If this is not acceptable, you may need to write a user-written program to unload the database and the FASTLOAD utility to reload it.
Copyright © 2014 CA.
All rights reserved.
 
|
|