This example is the same as example 1 except that the sort is to be undertaken on two fields. First, bytes 1 to 10 which are characters, and then, if these are equal, bytes 11 and 12 which contain a binary field, both fields are to be sorted in ascending order.
CALL PLISRTA (' SORT FIELDS=(1,10,CH,A,11,2,BI,A) ',
' RECORD TYPE=F,LENGTH=(80) ',
1048576,
RETCODE);