I have 1billion records in a PF.Key filed is Date.I want to generate a report based on Key field.Which approach will be best for me (I mean shall i go with OVRDBF or any other approach)Please suggest.(RPGIV-Free Format-V5R4)
Software/Hardware used:
ASKED:
October 5, 2011 7:21 AM
UPDATED:
March 31, 2012 12:38 AM
Thanks allot for your suggestion.But We can’t use SQL in this so need a help in RPGIV coding.
Is this a job that will be run more than once?
Is there already a logical file with the key defined?
If not you may consider creating one. This may take a long time due to the file size.
Either that or try using an OPNQRYF to select only the records you need.
You can imbed and run SQL code in an RPG program.
Source type is SQLRPGLE
Here is a sample
Are you asking how to print a report containing a billion rows ordered by key values? Or are you asking about how to select a set of rows for a report based on a set of key values?
I’m not clear on what difference the number of rows makes nor the difference keys make. Why mention them at all unless they have significance?
Tom
Tom asks…
I’m not clear on what difference the number of rows makes nor the difference keys make. Why mention them at all unless they have significance?
and I suggest “because that’s what the teacher/instructor put in the question, so that’s what’s echoed here. ”
Perhaps the student is supposed to explore and discuss the relative merits of database access algorithms apart from the practcalities of issuing a SETLL. The choice of database product could make quite a difference for high volume applications.
Good job they chose DB2 then.
Thanks allot & highly appreciated to everyone-CharileBrown,ToddN200,TomLiotta & Yark.
Now Client are ready for embedded SQL so we used this & it got solve.
I try OPNQRY its also working.