How can we search particular records from the database file
in RPG.
For example, there are
100 records in the file.i need to retrieve all the records
matching/equal to the particular 'NAME' field. How can we
do the above using SEARCH criteria other than using the IF
cond?
Answers were Sorted based on User's Feedback
Answer / maddy
This can be done using the Key Field.
KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / arvind
no IF so go wid DOU loop
f pfxx if e k disk
c dou *in90=*on
c name reade r1 90
........
......
enddo
c eval *inlr=*on
cud help i try it working many time
| Is This Answer Correct ? | 0 Yes | 1 No |
Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.
I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....
what is EXCEPT command in rpg and use
Interviewer asked me write down DDS for load all subfile .can anybody write dds
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
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?
how can we can we the data decimal error?how can we open such file in support
can we perform CHAIN operation on Subfile record format....?
Can we have a Physical file without any member ? Please let me know
suppose i i am changing / updating record of subfile and i want to change the record in reverse order . means i want to change the bottom record first and so on through readc . how i do it please any one explain .
how to display all the members records in a physical file without using ovrdbf?
How to read alternative records in a pf by using rpg?