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
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?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what is the use of sflnxtchg?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
what is file information data structure?
what is kids-rpg?
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.
how do I play {insert rpg system here}?
How to call one program from another program in RPG? please help me with the code
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
How Chain operation copies the record's data to the input buffer for the program?
what is the procedure and explain about real time scenario.
what is *place and *auto keyword in prtf ?plz explain
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........