× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Joe,

I'm not bashing RLA. You can still do RLA with a SQL cursor. You could say I am bashing the externally defined files used in iSeries RPG/COBOL/PLI programs which copies into the compiled programs those file formats. It's a violation of the DRY (don't repeat yourself) principal. This was a great advantage on the old S/38 technology - was one format duplicated multiple times instead of different file layouts in different programs. Now it is a liability with more modern technology that has the data definition in just one place - the database.

I wish to code in RPG V using external database tables (not files). No table formats embedded in the compiled code. Data definition reinterpreted at run time. If you can do it with embedded SQL why not also with the base RPG IV language? Maybe some set based RPG external table opcodes. Maybe a simple change to a file spec from external file to external table might be all the code change required. Just one last recompile to RPG Nirvana.

Hmmm, does the new SPECIAL file spec do that?

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta
Sent: Friday, September 02, 2011 12:22 PM
To: Midrange Systems Technical Discussion
Subject: Re: Storing Numeric Values in the Database

On 9/2/2011 10:46 AM, Morgan, Paul wrote:
Joe,

This is an implementation detail that used to be important (visible and with a shared best way) but now it isn't. You might need packed or binary for performance, zoned for readability of the raw data or floating-point because it matches a related database. From the other answers here we are moving away from working directly with the raw data. IMHO it's less about using the 'best' format than having a flexible database that can change to the most appropriate format without breaking code. That's why using embedded SQL instead of directly accessing the data with RPG is a good idea. SQL won't break (or it will break less) if you change the numeric format but RPG will break (maybe or probably and it requires a recompile). That's also why using a database retrieval tool (Query, DBU, SQL) instead of viewing the raw data is also good. Hiding details that aren't important makes it easy.


I'm enjoying the responses - it's really been a great representation of
the general community. But I really don't want the discussion be used
as an "RLA bashing" platform. If you want to get rid of RLA, that's
fine. But don't use the horrible pain and suffering of a recompile as
the excuse. SQL is still slower than RLA for lots and lots of things,
and it also requires jumping through hoops for some things that are very
simple in RLA.

I like to use whatever tools are available, and I trust my own skills to
know when each one is appropriate. And that includes DSPPFM :).

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.