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

why we do STRSRVJOB in batch debugging in as400

1 Answers  


Why we cannot call a service program? If I add a PEP can i call the service program?

1 Answers   DELL,


How can we know running job is batch or interactive?

0 Answers  


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

0 Answers  


1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?

3 Answers   Cap Gemini,


what is a rpg?

0 Answers   IBM,


What are the commands that can be executed in CLP but not in RPG? Why?

1 Answers   CSC,


what are the array operations?

1 Answers   IBM,


two types of read performed in dataqueue?????

4 Answers   CTS,


What is a record lock error?

0 Answers   Wipro,


what is file information data structure?

1 Answers   IBM,


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


Categories