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?

Answer Posted / kumar

The Answer is 20.
This is the code I tried and the answer is 20

 FEmpLF1    if   E           K Disk                   
 c                   move      25            EMPID    
 C     EMPID         SETLL     Emprec                 
 C                   READp     Emprec                 
 C     *IN80         IFEQ      *OFF                   
 C     EMPID         DSPLY                            
 c                   endif                            
 c                   eval      *INLR = *ON            

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is program status data structure?

1362


How can we override a file during runtime in rpg?

675


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...........

3264


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

746


how do you use commitment control in rpg?

743






How many program bind in one module....

2107


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

2358


What is a record lock error?

1254


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

725


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

1007


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

2509


what was the robotech rpg?

672


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.

5380


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

4189


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

491