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

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

1082


When it is desirable to describe files Internally?

1188


what is the necessary keyword needed to scroll subfile records?

704


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...

1310


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

4209






can I touch the array during treatments?

756


what is kids-rpg?

667


how do I declare a table or array in rpg iv?

737


can you debug ile rpg program using isdb?

739


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

747


What are the types of identifiers?

572


How to select highest score of each subject or how to select highest income of every month?

1295


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

709


How many program bind in one module....

2121


what is the difference between do while and do until?

703