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

Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks

3 Answers  


parameters cannot be passed in which one??

2 Answers   CTS,


As Packed veriable store 2 digits in 1 byte and ZONE variable store 1 digit in 1 byte... Please tell me when we have to use Packed and Zone variable...?

1 Answers  


How to sort an array in descending in RPG

3 Answers   Google, TCS,


what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  






If the last record of a file has been read, and the next operation on that file is a READ operation, what will be the values of the input fields for that file? A. They will be blank and/or zero. B. They will be null. C. They will equal the values of the first record in the file. D. They will equal the values of the last record read.

3 Answers  


How do I link an existing logical file to it's Physical File without recompiling?

2 Answers  


3 members in a databasefile .how to read records from all the members?????????

4 Answers   CTS,


WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?

2 Answers  


I have 1000 records in a file. I would like to generate 10 identical reports from this record with same format (structure of records) how do I do this?

1 Answers   IBM,


A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?

2 Answers   IBM,


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

0 Answers  


Categories