Breaking out of nested Do/For loops in CPQ

Since Epicor does not have traditional For and Do loops, I’ve been using Count to mimic For Loops such as:

For A = B To C
IF X = Y THEN
Do Stuff here
ELSE
Exit For
END IF
Next A

In Epicor I’m just using BREAK

For A = B To C
IF X = Y THEN
Do Stuff here
ELSE
BREAK
END IF
Next A

It works good enough, but if I have a nested For (or Count in Epicor) the Break only breaks out of the nested Count, not the entire structure. Has anyone run across a similar situation? Similar to nested Do While/For Loops. In VBA it’s easy to control what/where to exit/break out. Epicor, not so much. Also no support for GoTo:.

TIA.

The second should have been the nested COUNT, not FOR:

COUNT A FROM B To C
SET FIELD decS0 (Get A)
COUNT P FROM X to Y
SET FIELD txtESVar (Get field “txtIDPurlin” + (Get P)
IF txtESVar > 100
BREAK
BREAK

So in my case, when the condition is met within the indented COUNT P and txtESVar>100, the BREAK only breaks out of that COUNT, and the COUNT A still runs.