Page 1 of 1

Decrementing a loop

PostPosted: Fri Sep 21, 2007 7:07 pm
by Jeri Kattar
Hi,
To decrement a loop, I am using the following code. Please let me know if this fine.
I = 10
DO Z = I TO 1
SAY I
Z = I - 1
END

Re: Decrementing a loop

PostPosted: Fri Sep 21, 2007 8:29 pm
by Jeri Kattar
Pls anyone reply to this

Re: Decrementing a loop

PostPosted: Fri Sep 21, 2007 9:34 pm
by CICS Guy
If you are in that much of a hurry, why not just look at the manual?
Controlled Repetitive Loops

Re: Decrementing a loop

PostPosted: Fri Mar 21, 2008 1:04 am
by scorpio.negi
Check the IBM manual.....btw ur code wont work coz the do incrementer always adds the value (by default 1)....if you want to decrement do something like...

do i = 10 to 1 step by -1
....
....
end