Changing an IDMS set order from SORTED to unsorted ORDER LAST
search cancel

Changing an IDMS set order from SORTED to unsorted ORDER LAST

book

Article ID: 434364

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

An IDMS network database has a chained set defined as ORDER IS SORTED with a symbolic key. A requirement arises to change the set order to unsorted with ORDER IS LAST, where new member records are connected at the end of the chain. How should the schema and database be updated to reflect this change?

Cause

Changing a set definition from sorted to chronological (unsorted) is a configuration modification that alters how the DBMS manages the physical linking of new records within the set occurrence.

Resolution

To change the set order from sorted to unsorted (last), perform the following administrative steps:

  1. Modify the Schema: Update the SET statement in the schema by changing ORDER IS SORTED to ORDER IS LAST.
  2. Remove the Key: Delete the KEY IS clause from the set definition. Unsorted sets do not support symbolic keys. Failure to remove the key while the set is not sorted will result in schema validation error DC643162.
  3. Regenerate Subschemas: Validate and generate the updated schema, then regenerate all subschemas referencing this set.
  4. Data Handling: No data reorganization (such as Unload/Reload) is required. Because IDMS chained sets are linked lists, the existing member records remain in their current physical sequence. New records stored after the change will be connected to the end of the set.

The same procedure can be followed for unsorted options FIRST, NEXT and PRIOR.

Additional Information

See IDMS Documentation section Set Statement Schema and Set Modifications