i have 1000 records in pf.what are all the ways to read a
particular name records in rpg?? ie.. in pf i have a name
called demo appeared around 52 times hw will we read this
particular records in rpg/400?.

Answer Posted / swetha p rao

If the particular field value is demo , then you can do
onething to avoid reading the file unnecesarily

1. Declare a temporary file in user open mode and specify
as external mbr in F spec.

2. In CPYF there is an option to include records (INCREL )
based on selection, just copy all the records where the
field value is 'demo' in a temporary file with a create
file option. (using QCMDEXC)

3.Now the temporary file will have only demo records.Open
the file and read the records.

(or)

Using SQLRPGLE, write a query to select the records which
has field value 'demo'


Correct me if iam wrong

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a rpg?

680


which program rpg or cl is efficent to update a transaction onto a database file and why ?

722


can you debug ile rpg program using isdb?

718


can I touch the array during treatments?

733


Explain mdt?

648






what is the difference between do while and do until?

680


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?

480


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2175


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

673


explain sflclr, sflend, sfldlt, and sflcsrrrn?

857


What is ment by record level identifier?

639


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

701


How to handle duplicate error handling in RPG?

1656


how do I declare a minor?

699


what is kids-rpg?

653