zOs/TX/PER06SEL

select t, bet, substr(char(cur), 12) "cur"   ,
               substr(char(tst5), 12) "tst5" ,
               substr(char(tst6), 12) "tst6"
from (
select 't5' t,
        (select count(*) from A540769.tPer06x6 a6
             where a6.cur < t5.cur and a6.cur > t5.tst6) bet,
        t5.* from A540769.tPer06x5 t5
    where cur <= (select max(cur) from A540769.tPer06x6 )
union all select 't6' t,
        (select count(*) from A540769.tPer06x5 a5
             where a5.cur < t6.cur and a5.cur > t6.tst5) bet,
        t6.* from A540769.tPer06x6 t6
    where cur <= (select max(cur) from A540769.tPer06x5 )
) x
    order by 3    asc
    fetch first 100 rows only