How to use loop in REXX program?
In REXX programs, we can add the logic for loops with the help of DO statement.
Sample Program -
/*REXX*/
SAY 'Loop in REXX'
Y=0
DO X=1 TO 5
Y=X + Y
SAY Y
END
Above REXX program will print the 1 to 10 numbers on console
1
2
3
4
5