I have a PF(ABC)with no key fields.
PF(ABC)have 2 fields (cusno and cusname).
Please let me know how can i read the cusno = 1150 directly
from PF in CL and RPG program(Without creating the LF and
without reading the complete file and then compare 1150)
Answer Posted / vijay
In CL PGM
do CPYF from file ABC to ABC qtemp with the selection
field (CUSTNO) = 1150 (value) so ABC in qtemp have only one
record with that cust no. then read this file in CL program.
In RPGLE...
you can used SQLRPGLE program and write a SQL select
statement on the on file ABC.
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
do you use message subfiles? What are the necessary keywords required coding a message subfile?
What are the types of identifiers?
What is the difference between iter and do?
how does the rpg element work?
what is the rpg system?
Explain mdt?
What is difference between bind by copy and bind by reference?
what is data area and how it is used in rpg program ?
How to write record if no field or the field are different in physical file in rpgle ?
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?
how do I declare a table or array in rpg iv?
how do I preserve and clean the array?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
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?
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.