@guyc yes that logic works perfectly , but what happened was my attributes had to be changed from one to many to many to many relationship. so it becomes difficult to implement that logic and i had to use cursors due to that reason exactly
thanks for giving the idea though
i used a cursor, i fetched the records required based on matching attributes, when a match occurs i move them into a group variable which i move into a queue after writing all the matches have been entered into the queue , i read the queue and send the values one by one to the map and aid key enter being pressed