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

what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?

4 Answers  


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,


What is the difference between RPG/400 and RPG4

1 Answers   HCL,


When a object will be locked & when a record will be locked? Plz explain.

2 Answers  


What is difference between bind by copy and bind by reference?

0 Answers  






how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE

3 Answers   iGate,


How can i check the object existance in RPG program without using QCMDEXC command.

7 Answers   IBM, JDA,


I have learnt through Net that Debugging a Batch job involves 1. Submit the job with the HOLD (*YES) parameter: SBMJOB HOLD(*YES) or Hold the job queue that before submitting the job by using the HLDJOBQ command. 2. Determine the job name, user, and number of the submitted job by using the WRKSBMJOB command. 3. Type the Start Service Job command on your screen: STRSRVJOB JOB(job name/user/number) 4. Type the Start Debug command on your screen: STRDBG 5. Release the job in the jobq. Type WRKSBMJOB and then put a 6 beside the job to be released and press enter, or, if the job queue was put on hold, release the job queue with the RLSJOBQ command. 6. A display appears when the job is ready to start, saying that you can now begin debugging the job. Press F10 to show the Command Entry display. 7. Now you can start debugging by entering an Add Break Point command: ADDBKP 8.ENDDBG 9.ENDSRVJOB I tried this for RPG/400 Program and up to six steps of the above it's ok,but for me no source is displayed and i typed DSPMODSRC in Command line but still i can't see the sourceif i press F.10 and enter command ADDBKP i don't know how to add break points through it,usually i add break points using F.6 for Interactive job debugs,but since this is batch i don't know sir,Please help me out. I was asked this question in a interview,i know only RPG/400 and i’m asking for debugging of RPG/400 program only sir. or is it only possible to debug BATCH RPG ILE JOB and it is not possible to debug BATCH RPG/400 JOB kindly help me out sir

4 Answers   HSBC,


we hav job which is running as batch. it takes atleast 06hours to complete tht job. bu i wana do tht job with in 3hours.........? so plz post ur answers

8 Answers   Cap Gemini, IBM,


Suppose you have 3 members in a database file. How to read records from all the members without using CL (OVRDBF) i.e. Entire process should be handled exclusively in a RPG program?

7 Answers  


How to update selected fields from pf without using update opcode. How to read all member in Rpg-3,without using any cl command?

8 Answers  


how can we know running job is batch or intractive ? i need all the possibilites.........plz help me

3 Answers   HSBC, IBM,


Categories