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

Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

0 Answers  


in which journalling which attributes are necessary

2 Answers   CTS,


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


is this a rpg channel?

0 Answers   IBM,


what is plat file?

6 Answers   Indian Infotech,






Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  


i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?

1 Answers   IBM,


What is the purpose of FRCDTA keyword?

3 Answers   IBM,


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)

2 Answers   CTS,


i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?

6 Answers   Mind Tree,


Categories