suppose there are 100 records and i want to read records between 60-70 how we can read this 10 records in rpg
Answers were Sorted based on User's Feedback
Answer / siyan sinhag
It such a easy question. Make few way to solve. one of my way. Declare the file and do yourself coding atlast what you do,
Setll RRN REC;
Dow (n <=10);
n= n+1;
....
....
enddo;
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / surya siram
Hi,
Declare the physical file and make sure the physical file shouldn't have any keys. Load value 60 into RRN variable and then by using SETLL RRN PF, hit the physical file. Then increment the RRN upto 70 and read the records.
| Is This Answer Correct ? | 4 Yes | 0 No |
RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.
Q1.How to read the Array? Q2.How to copy the content of one Array to another Array?
Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?
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?
how to check on which PF , the LF is dependant ?
The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?
i'm working on progA , in that program i want to see the userids of the users who work on this program?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++ D RESULT S 5 0 C EVAL RESULT = (2 + 3 * 2) ** 2 / 2
The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?
How can we override a file during runtime in rpg?