How can we read a particular record from the database file
which is not having DDS (Flat File). For example, there are
100 records in the flat file. How can we retrive 15th
record in RPG/400 program (Without using CL)

Answer Posted / pravin

there are too many ways-
1. declare that flat file as a edf in pgm and rename the
rcd-format and field name than set the pointer on 15 record
by setll and then read it.
2. define a per-run time array with fromfile(name of flate
file). then see th2 arrays 15 index value.

this are two methods. i have 2 more methods also
if any one want's contact me on pravin_cse1@yahoo.com

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How Chain operation copies the record's data to the input buffer for the program?

1065


what is a rpg?

686


what is *place and *auto keyword in prtf ?plz explain

2708


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

818


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

474






What is ment by record level identifier?

643


what are the key words you must use when using a subfile?

680


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

602


is this a rpg channel?

665


do you use message subfiles? What are the necessary keywords required coding a message subfile?

675


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1437


Explain mdt?

653


What is difference between bind by copy and bind by reference?

1713


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?

488


how do I preserve and clean the array?

663