suppose there are 100 records and i want to read records between 60-70 how we can read this 10 records in rpg

Answers were Sorted based on User's Feedback



suppose there are 100 records and i want to read records between 60-70 how we can read this 10 recor..

Answer / siyan sinhag

It such a easy question. Make few way to solve. one of my way. Declare the file and do yourself coding atlast what you do,

Setll RRN REC;
Dow (n <=10);
n= n+1;
....
....
enddo;

Is This Answer Correct ?    7 Yes 2 No

suppose there are 100 records and i want to read records between 60-70 how we can read this 10 recor..

Answer / surya siram

Hi,

Declare the physical file and make sure the physical file shouldn't have any keys. Load value 60 into RRN variable and then by using SETLL RRN PF, hit the physical file. Then increment the RRN upto 70 and read the records.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More RPG400 Interview Questions

what is file information data structure?

2 Answers   IBM,


How to print output from openquery in as400 ?

1 Answers   Four soft,


Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++ D RESULT S 5 0 C EVAL RESULT = (2 + 3 * 2) ** 2 / 2

2 Answers  


What is the length of Signature?

3 Answers   UST,


difference between 1:%found and %equal built function in detail with example .

6 Answers   Polaris,


how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the error through the RPG/400

10 Answers   IBM, Tech Mahindra,


if there is pf in two libraries and there is a logical file based on the PF, how to find the pf on which the pf is based.

2 Answers   TCS,


two attributes which govern the excecution of a job>>>>??

2 Answers   CTS,


what is post opcode do

1 Answers   CTS,


i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


Categories