0022: Loop counter is not a variable The compiler finds that a FOR loop's counter is not a variable. Possible solutions: use a variable as the counter of the loop iterations: FOR $MyCounter = 1 to 10 END