If I understand your question - you want to retrieve the first occurance of a segment (in this case a parent segment) after some other processing has done something.
There is a procedure in place to let you do that. By using a Unqualified SSA on a GN call for the segment desired you will retrieve the first occurance when using it for the first time. Note: It'll always extract first occurrence of the segment.
The first use of this SSA retrieves the first occurance. The next use of this SSA will retrieve the next occurance of that segment regardless of parentage. However since you onlly want the first occurance of the highest parent you are ok. Use this SSA to retrieve the first parent and do not use it again.
For how to create a Unqualified SSA please refer to the IBM IMS V10 manual. Here is the link:
http://pic.dhe.ibm.com/infocenter/dzich ... p3hqyc.htm If this stills sounds unclear. I will provide an example but you should be ok.