I am still gun shy of DB2 SQL functions calls. My last test with httpGetBlob came back with a respond time that was way to slow when you are doing thousands of calls.
When we switch to 7.3 this week I want to see if json tables will be faster than YAJL for parsing.
John Slanina
-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Jones
Sent: Monday, January 15, 2018 1:52 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Built-in %split RPGLE function
IMO...
Whether or not the SQL is faster or slower than RPG depends on what you do with the parsed results.
If you're going to consume the parsed results in RPG, than an efficiently written RPG routine would likely perform faster.
If you're going to consume the parsed results in the same SET based SQL statement, than the SQL would likely perform faster (i.e. the parse function is called as part of the same SQL query consuming the parsed results). This would likely result in a smaller volume of code as well, because SQL is handling all the glue necessary to tie the parse to the consumption. In RPG, you have to supply said glue code and memory definition to store the parsed results.
Our shops should have both an RPG and an SQL solution for such a common thing as parsing a delimited string.
Mike
On Mon, Jan 15, 2018 at 10:23 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
Birgitta has supplied an example. Others have mentioned Scott's RPG
Service routines.
Both - I strongly suspect - will be faster than the SQL approach and
certainly easier to understand and modify.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.