Midrange News for the IBM i Community

Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Performance of the Rreadn (rec I/O) API
has no ratings.
Published: 01 May 2013
Revised: 02 May 2013 - 4039 days ago
Last viewed on: 22 May 2024 (4858 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.

Performance of the Rreadn (rec I/O) API Published by: Bob Cozzi on 01 May 2013 view comments(2)

I had to move from standard RPG IV I/O (CHAIN, READ, SETLL...) to using the _ROpen, _RReadn and _RLocate functions in my Copy to CSV routine.

What I'm noticing now is that the time it takes to convert a LARGE database file to CSV has increased substantially over native RPG I/O methods.

Does anyone have any performance tips, documents or webpage(s) that might help improving performance when processing tens of thousands of records with the _Rxxxx I/O APIs.

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


(Sign in to Post a Comment)
Posted by: KevinLandWaster
Premium member *
Sydney, NSW, Australia
Comment on: Performance of the Rreadn (rec I/O) API
Posted: 11 years 22 days 8 hours 32 minutes ago
Edited: Wed, 01 May, 2013 at 17:23:46 (4040 days ago)

Hi Bob,

Two things: blocking when you _ROpen, and also not having a separate buffer - using the inbuilt buffer & then setting a pointer to your record structure to the inbuilt buffer. The latter is documented in TFM somewhere. (Library functions where _Rxxx are documented or maybe C programmer's guide).



Posted by: bobcozzi
Site Admin ****
Comment on: Performance of the Rreadn (rec I/O) API
Posted: 11 years 21 days 12 hours 3 minutes ago

Thanks Kevin. I'm doing those two things and it hasn't helped. I'm going to play with the SEQONLY and NBRRCDS parameters of the OVRDBF command to see if it helps.