Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
Processing a LARGE number of rcds quickly??
has no ratings.
Published: 01 Jun 2015
Revised: 05 Jun 2015 - 1167 days ago
Last viewed on: 15 Aug 2018 (2114 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Processing a LARGE number of rcds quickly?? Published by: Chris Proctor on 01 Jun 2015 view comments(3)

Good morning. I have a situation where we need to process a large number of rcds in a short period of time and I'm wondering if anyone might have been in this same situation and came up with a good solution. The program is simple, but it is currently processing approx 16M rcds. Here's a brief look at what the program needs to do.

 

READ FILEA

DOW NOT %EOF

  SETGT <On key fields> FILEB

  READPE FILEB   <-- The reason this is needed is because the key includes year and week and all may not exist, so we need to grab the latest available

  IF NOT %EOF

    CHAIN <key> FILEC

     IF %FOUND

        ADD FIELDS TO TOTALS

        UPDATE FILEC

      ELSE

         MOVE FIELDS AND TOTALS TO RCD

         WRITE FILEC

       ENDIF

     ENDIF

     READ FILEA

ENDDO

Any suggestions would be greatly appreciated. I was actually trying to think of ways to possibly break it down into multiple jobs being submitted, or something like that. I'd be interested to hear any other ideas. Thanks, all!!

 

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS