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 / ardeep
If the SETLL operation is not successful (no records found condition), the file is positioned to the end of the file.
10 20 30 40
So when 25 is searched the pointer goes to 40.
And now when READP (Read Previous) is issued it fetches
30.
Answer is 30.
Have Fun :) !!
| Is This Answer Correct ? | 5 Yes | 22 No |
Post New Answer View All Answers
what is the necessary keyword needed to scroll subfile records?
how do I declare a table or array in rpg iv?
How to write record if no field or the field are different in physical file in rpgle ?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
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.
how do I preserve and clean the array?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what is the difference between do while and do until?
How to call one program from another program in RPG? please help me with the code
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
how does the rpg element work?
how can I tell when to replace the array?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen