CA Tech Tip: CA IDMS - Procedure to change the sort key of a user-owned index set that requires a restructure

Discussion created by Eddy_G Employee on Jul 28, 2015

CA IDMS Tech Tip by Edward Gorga, Senior Principal Support Engineer for July 28, 2015


Changing the sort key of a user-owned index set that requires a restructure is a more complex process than normal.


Use the following procedure:


  1. Write a program that uses the current subschema to sweep the user-owned index set OWNERs, walking each member and writing to a flat file information that relates each member to its owner. This can be DBKEY pairs or if the owner and member are both CALC records, you can use the CALCKEY provided it is not changing. You can use any other information that uniquely identifies the members and their owners. Then DISCONNECT each member from the index set. You may need to temporarily change membership options to OM to do this.
  2. Create a new schema/subschema with the required changes to the key field.
  3. Create the IDMSRSTT module for the restructure. You can do this by running the IDMSRSTC utility which compares the old and new schemas and generates the IDMSRSTT macro statements.
  4. Run a RESTRUCTURE to expand the key field.
  5. Write a second program to read the flat file created in step 1 and use the new subschema to obtain each member then CONNECT it to the appropriate owner. 


Note: If the expansion of the key will change the sort order of the set you will have to account for this in the the user-written programs.


The same information is also available in Knowledge Document TEC1895102