You're checking the values of counta
and countz
in the first DO
loop - however you aren't incrementing them until the second DO
loop.
Move your:
c counta ifge 9990
C EVAL *INLR = *ON
c leave
c endif
c countz ifge 9990
C EVAL *INLR = *ON
c leave
c endif
code into the second DO
loop.