What is the difference between ITER and DO ? I know both are
used to execute set of statements repeatedly, but what is the
main difference?

Answers were Sorted based on User's Feedback



What is the difference between ITER and DO ? I know both are used to execute set of statements rep..

Answer / joy mukherjee

There is no comparision between DO and ITER as DO statement
is an looping statement and ITER is an branching statement
like LEAVE.
When I use ITER with some condition inside a DO-ENDDO loop,
when that condition occouerd, ITER transfered the control
to ENDDO not out of the loop like LEAVE ie it just skip the
excecution of statements between ITER and ENDDO.

In one statement we can say that ITER in RPGLE is same as
CONTINUE in C.

Is This Answer Correct ?    27 Yes 1 No

What is the difference between ITER and DO ? I know both are used to execute set of statements rep..

Answer / chittim

with in a do loop itself again we have to create loop again
where u want loop by using iterate.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More RPG400 Interview Questions

Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  


Anybody know the difference of primary file and full procedural file

4 Answers  


please guys help me,I need to write a program that shows more than one way to display a subfile. Both views are of the same file but sorted differently and show different fields of the same file when the user presses a function key. send me code

4 Answers   Virtusa,


1.How can you search an entire source file for a particular field name? 2.How can you find the differences between two versions of the source for the same program? 3.What is a hidden field as it relates to a sub file? 4.How do you display a sub file that has no records in the sub file?

8 Answers   HCL,


wat is the difference between dataarea and data queue?

5 Answers   Airtel, Four soft, Shahi Exports,






Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?

2 Answers  


Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?

4 Answers   IBM,


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

0 Answers  


HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....

1 Answers   HCL, Mind Tree,


1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?

2 Answers   HSBC,


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


What are the necessary keywords required to code a message subfile?

3 Answers  


Categories