Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

load OI table into SRP_LIST

I want to speed up XLATE in my app
i am trying to sort how to manage this with the SRP_list, SRP_array vs the OI Basic+ INSERT/LOCATE
i am thinking to create 2 arrays, kept sorted by doing the usual LOCATE x BY 'AR' using @FM setting pos,
then doing an insert into the keys_array and a equivalent insert into the data_array

then when looking for key '200abc', i'd do locate setting, and extract what i want from data_array

but in the purported SRP mode?

i've tried to scan the wiki for sample code, still have training wheels on and have falled over.

cheers

Comments

  • SRP_List and SRP_Array do not support an equivalent to LOCATE BY, and you can't do a BASIC+ LOCATE BY on them directly.

    It sounds like you just want an in-memory table. SRP_HashTable might be what you are after. No sorting needed. You just add key-value pairs to it. We do this all the time for faster lookups.
  • Cheers Kevin
  • ok, what's the following comment all about - and release when? " Don't forget to release your SRP Hash Table handles. Always."?

    i am looking to create a hashtable or 7 and keep them in memory until i want to log out of OI.
    do i keep the handle in /common/?
  • Look at this thread as I think you can benefit from it as well.
Sign In or Register to comment.