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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

773


How many program bind in one module....

2125


Explain mdt?

667


can you debug ile rpg program using isdb?

739


how do I declare a table or array in rpg iv?

739






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.

2054


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

713


what is the necessary keyword needed to scroll subfile records?

704


what is kids-rpg?

669


how can I tell when to replace the array?

704


do you use message subfiles? What are the necessary keywords required coding a message subfile?

690


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

755


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

1464


is this a rpg channel?

681


What is file identifier where we can use?

652