![dofor allows for logic in cl program](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTL3nZXaeCASScbHlR9eKCqGOQyAc53BYRvZuTN9rCHRzcmjBxtL4ab2VOnM0IPqALiXdoDaeT7B5RgrTULTZu4IeAqBCDSL8WPVX6ZcLXoTQywTSzbits1_WJuwbXo6CkN7ZNRt0tjSXe/s200/cl.png)
This comes under the category of: I thought I had already written about this. The DOFOR command in CL allows me to construct a For group in CL, like I can in RPG when I use its FOR operation code. The same information has to be given to both:
RPG === for Count = 1 to 10 by 1 ; CLLE ==== DOFOR VAR(&COUNT) FROM(1) TO(10) BY(1) |
- What I call the count variable
- Starting value
- End value
- Increment value, this is optional as it is in RPG. If it is not given 1 is assumed