These routines re-arrange the horizontal linking
within a given linear structure such that the key-words contained in
each bank increase monotonically when moving through the linear
structure with L=LQ(L)
.
For equal key-words the original order is preserved.
Key-words may be either floating, integer or Hollerith. For Hollerith sorting a collating sequence inherent in the representation is used, thus the results will depend on the machine.
Sorting may be done either for a single key-word in every bank or for a key vector in every bank:
CALL ZSORT (IXSTOR,*!LLS*,JKEY)
Sorts banks according to a single floating-point keyword
CALL ZSORTI (IXSTOR,*!LLS*,JKEY)
Sorts banks according to a single integer keyword
CALL ZSORTH (IXSTOR,*!LLS*,JKEY)
Sorts banks according to a single Hollerith keyword
CALL ZSORV (IXSTOR,*!LLS*,JKEY,NKEYS)
Sorts banks according to a floating-point key vector
CALL ZSORVI (IXSTOR,*!LLS*,JKEY,NKEYS)
Sorts banks according to an integer key vector
CALL ZSORVH (IXSTOR,*!LLS*,JKEY,NKEYS)
Sorts banks according to a Hollerith key vector
with the parameters IXSTOR index of the store or of any division in this store, zero for the primary store; *!LLS* the address of the first bank of the linear structure, reset on return to point to the new first bank; JKEY in each bank at L, Q(L+JKEY) is the key word, or the first word of the key vector; NKEYS the number of words in the key vector.
The execution time taken by these routines is a function of the re-ordering which needs to be done. For perfect order the operation is a simple verification pass through the structure. The maximum time is taken if the banks are initially arranged with decreasing key words.
Sorting re-links the banks such that the key-words are in
increasing order.
If one needs them in decreasing order on may use
CALL \Rind{ZTOPSY
(IXSTOR,LLS)}
which reverses the order of the banks in the linear structure
pointed to be LLS
.