Local Rowset &rsLvl1, &rsLvl2;
/* Get Level 1 Rowset */
&rsLvl1 = GetLevel0()(1).GetRowset(Scroll.XXX1); /* Gets the current row of Level 0. */
For &i = 1 To &rsLvl1.ActiveRowCount
/* Get Level 2 Rowset */
&rsLvl2 = &rsLvl1(&i).GetRowset(Scroll.XXX2);
/* Flush Record */
&rsLvl2.Flush();
/* Select Record */
&rsLvl2.Select(Record.XXX2, "WHERE TERM = :1", &rsLvl1.GetRow(&i).XXX1.STRM.Value);
End-For;
/* Get Level 1 Rowset */
&rsLvl1 = GetLevel0()(1).GetRowset(Scroll.XXX1); /* Gets the current row of Level 0. */
For &i = 1 To &rsLvl1.ActiveRowCount
/* Get Level 2 Rowset */
&rsLvl2 = &rsLvl1(&i).GetRowset(Scroll.XXX2);
/* Flush Record */
&rsLvl2.Flush();
/* Select Record */
&rsLvl2.Select(Record.XXX2, "WHERE TERM = :1", &rsLvl1.GetRow(&i).XXX1.STRM.Value);
End-For;