My particualr IMS db structure looks like this.
PLA00000 Level 1- FIRST 5 BYTES KEY AND remaining - parent
PLA05000 Level 2- FIRST 5 BYTES KEY AND remaining - child
Concentrating on the child segment(PLA05000), it has one primary ssa key and many other secondary ssa keys and one of the ssa is ORDER-ID.
EXAMPLE - Many child segements are available under one parent and My requirement is that I've to retrieve the highest order id avaialble using one IMS call.
*********************************** PLA00000 ***********************************
++++5+++10+++15+++20+++25+++30+++35+++40+++45+++50+++55+++60+++65+++70+++75+++80
PPPPPZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
*********************************** PLA05000 ***********************************
++++5+++10+++15+++20+++25+++30+++35+++40+++45+++50+++55+++60+++65+++70+++75+++80
QQQQQZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ10105ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
RRRRRZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ90101ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
SSSSSZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ20102ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
TTTTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ70103ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
UUUUUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ30101ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
++++5+++10+++15+++20+++25+++30+++35+++40+++45+++50+++55+++60+++65+++70+++75+++80
PPPPPZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
*********************************** PLA05000 ***********************************
++++5+++10+++15+++20+++25+++30+++35+++40+++45+++50+++55+++60+++65+++70+++75+++80
QQQQQZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ10105ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
RRRRRZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ90101ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
SSSSSZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ20102ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
TTTTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ70103ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
UUUUUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ30101ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
In general PLA05000*L gives the last segment(UUUUU) similarly, in accordance with order-id(position - 50) i need to retrieve 2nd segment(RRRRR) which is
the highest value, using one IMS call.
Otherwise i need to look all the segments one by one to acheive this and that is time and cpu consumption as there could be 1000 of child segments real time.
Highly appreciate any suggestions. Thank you.