RPGIV Coding Approach for 1 billion records

65 pts.
Tags:
iseries v5r4
OVRDBF
RPG Code
RPG IV
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)

Answer Wiki

Thanks. We'll let you know when a new response is added.

I would use SQL.
If you need to do it within an RPG program, imbed the SQL to do the record select.

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Pankaj1122
    Thanks allot for your suggestion.But We can't use SQL in this so need a help in RPGIV coding.
    65 pointsBadges:
    report
  • ToddN2000
    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.
    11,350 pointsBadges:
    report
  • CharlieBrowne
    You can imbed and run SQL code in an RPG program. Source type is SQLRPGLE Here is a sample
    c/exec sql                                                            
    c+ insert into STMTIDXDB                                              
    c+ (CUNUM, SYSTEM, PRN, AGENT,  ACCOUNT#, STMTTYPE,                   
    c+                    STATEMENT_DATE, STATEMENT_DATA)                 
    c+ values (:prCuNum, :prSys, :prPrn, :prAgt, :prAccount, :vStmtType,  
    c+                    :statementDate, :vPdfFile)                      
    c/end-exec
    41,380 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Yorkshireman
    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.
    5,580 pointsBadges:
    report
  • Pankaj1122
    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.
    65 pointsBadges:
    report
  • Pankaj1122
    [...] 7. Get suggestions from CharlieBrowne, ToddN2000, TomLiotta, and Yorkshireman on an appropriate RPGIV coding approach for 1 billion records. [...]
    0 pointsBadges:
    report
  • Pankaj1122
    [...] 7. Get suggestions from CharlieBrowne, ToddN2000, TomLiotta, and Yorkshireman on an appropriate RPGIV coding approach for 1 billion records. [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following