Previous Topic: Graphic ConsiderationsNext Topic: Sample XSETLINE Statements and Resulting Set Descriptions


Placement of Multiple Sort or Index Keys

You can use an optional subscript with the SET-ORDER field to specify placement of multiple sort or index key names within the set description.

The syntax is:

SET-ORDER (ss)

where ss may be an integer from 1 to 256 or the capital letter N.

When you use an integer from 1 to 256, you are explicitly placing the sort or index keys you want to see at the positions you specify. For example, SET-ORDER(1) positions the first sort or index key found in the dictionary for each set or index. SET-ORDER(2) positions the second sort or index key, etc. If you use SET-ORDER without a subscript, it is equivalent to SET-ORDER(1).

When you use only the letter N, CA IDMS Schema Mapper places all sort or index keys in the set description beginning at the position indicated by SET-ORDER(N). The first sort or index key appears at that position followed by the remaining sort or index keys one per line.

You can choose to explicitly place one or more sort or index keys and have CA IDMS Schema Mapper implicitly place the remaining ones. Any sort or index keys that have not been positioned by an explicit subscript appear one per line, starting with the position indicated by SET-ORDER(N). See Sample XSETLINE Statements and Resulting Set Descriptions.

When you do not use SET-ORDER(N) and there are more sort or index keys than you have explicitly positioned, the additional sort or index keys do not appear in the set description. An I011 message appears in the Audit Report to let you know this has happened. For example, if one of your sets or indexes has five sort or index keys, but you only use SET-ORDER(1), SET-ORDER(2), and SET-ORDER(3) in your XSETLINE statements, then the fourth and fifth sort or index keys do not appear in the set description.

Also, SET-ORDER(N) affects only sort or index keys that follow the highest explicit position. If any lower subscripts are omitted from the XSETLINE statements, the corresponding sort or index keys do not appear in the Cross-Reference Report. For example, if a set has five sort keys and the XSETLINE statements use SET-ORDER(1), SET-ORDER(3), and SET-ORDER(N), then SET-ORDER(N) positions sort keys 4 and 5 only. Sort key 2 does not appear in the Cross-Reference Report. Any sort or index key that does not appear in the Cross-Reference Report, for any reason, is listed in the Audit Report with an I011 message.

CA IDMS Schema Mapper makes all set descriptions the same size (remember, XSETLINE is a global parameter). Therefore, when only one of your sets or indexes contains multiple sort or index keys and you want all the keys for that set or index to appear in the set description, then every set description in the Cross-Reference Report contains space for multiple sort or index keys. This is true even if a particular set does not have a set order of sorted.

By default, CA IDMS Schema Mapper uses SET-ORDER(N). Therefore, all default set descriptions contain space for all sort or index keys.