QTIPS - Descending Order Quickdex/Rightdexes

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 APR 19922.11+EXPERTQUICKDEX, RIGHTDEX, MFS, LRDEX.SUB, DESCENDING

If it is ever required to quickdex or rightdex a file in descending order this may be accomplished using the system subroutine LRDEX.SUB. This is essentially an MFS shell with one extra parameter at the end - the sort order. The calling parameters are

Lrdex.Sub(Code,BFS,Handle,Name,FMC,Record,Status,S_Order)

Thus to add a descending rightdex to a file one could create an MFS as follows

    Subroutine DR_MFS( A, B, C ,D, E, F, G)
     call lrdex.sub(a,b,c,d,e,f,g,"DR")
    Return

Then add DR_MFS as the last multivalue of attribute 2 of the REVMEDIA record. Note that this is the simplest form of MFS shell possible - additional logic could easily be built in to exclude specific records from the sorted list etc.

(Volume 3, Issue 10, Page 4)