1. I have2 records in a PF.
READ PF
DO
DSPLY EMPNO
RETRN
DSPLY EMPNO
ENDDO
What was the output
2. SETON LR vs RETURN
3. Primary File
4. How to delete a deleted spaces
5. How to read a PF in reverse order in CL
6. I have a object in Lib A, B and C. But it shows in D
Lib..Why?
7.

Answer Posted / srikanth

After executing RETURN statement, any statements next to RETURN will also be executed. In the above code program will display two records. When you call same program again from same session next two records will be displayed. If program is coded with LR indicator, next call of same program will also display same first two records.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you mean by an input subfile, what are the keywords required?

773


what is the rpg system?

668


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

5407


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3285


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1019






what is data area and how it is used in rpg program ?

756


what is program status data structure?

1387


Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.

1761


how can you display specific subfile page on the screen in unequal subfile?

675


what is a rpg?

701


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

2373


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2519


How would display prime numbers using CL program?

5679


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


How to declare the pull button in AS/400..

1880