Systems Architects and Engineers specialising in the effective use of Systems Architecture, Methods and Tools since 1982

Sequence Codes for Sphere Items

Spheres define the details of large numbers of individual items arranged as hierarchies of up to five levels. To control the inherent hierarchical relations between these items and to provide means of ordering and retrieving them, they are assigned Sequence Codes.

Construction of the Code

Codes contain two characters for each level of the hierarchy. These may be any of the characters 0 to 9 or A to Z giving a possible 36 x 36 or 1296 entries for the top level and the same number for each leg of the sphere at each lower level. (I leave it as an exercise for the reader to determine how many items, in total, a sphere may contain.)

Assigning Codes

Normally you will want to assign top level codes manually but it is, in fact, only necessary to assign the very first code; the system will handle the generation of successive codes at your chosen level after this. Alternatively, you may wish to assign codes to reflect your own particular groupings.

Generated Codes

The system bases each generated code on the last code already available at the level and in the sequence in use. For the last pair of characters in the sequence code:

For a numeric second character, increase the value by 1. (AB01 -> AB02)

If the result is 10 set the character to 0 and carry to the first character. (AB19 -> AB20)

For an alphabetic second character, change it to the next character in the alphabet. (AB -> AC)

If the second character was already Z set it to A and carry to the first character. (ABAZ -> ABBA)

For a carry to a numeric first character, increase the value by 1.

If the result is 10, set the character to A. (AB99 -> ABA0)

For a carry to an alphabetic first character, change it to the next character in the alphabet. (ABAB -> ABAC)

No carry is available between character pairs (levels). (ABZZ -> no result)

The result is to maintain the style of the numbering system so far as possible but to allow considerable flexibility.