× 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.



So, based on this and other comments recently, it appears that the preferred
method of DB design (and corresponding program fields) in the IBM-i world is
coming around to the following:

Large (oversize) varying length character fields
Large (oversize) numeric fields (with many decimals if required)

Is that a fair assumption? How many of you have done so or are planning to
do so for new development?



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Thursday, November 01, 2012 11:13 AM
To: RPG programming on the IBM i / System i
Subject: Re: Could RPG become quasi-immune to level checks (was: Are level
checks still useful?)

hi Jeff,

On 11/1/2012 11:43 AM, Jeff Crosby wrote:
Theoretically, could RPG be enhanced such that the from/to positions
are _not_ hard-coded at compile time? Instead, based on field name
(whether renamed or not), the from/to positions would be established at
run time.

That's exactly the way embedded SQL works. It's already there, waiting for
you... you just have to use it.

I've also written a native I/O tool that works the same way. Though,
there's really no reason to use it, SQL is just better.

Ultimately the problem is you'll eventually need to save the result into a
variable, and the traditional RPG mindset is to use the exact same size
variable as the DB field. And that's where the problems start. If you use
oversized fields, this wouldn't be an issue, but RPGers always struggle to
change their mindsets.

Eventually, after fighting yourself to change, you end up saying "what was
so bad about the level checks to begin with? I have a tool that makes it
easy to recompile everything." And, I tend to agree... I don't find it
that cumbersome, these days, to update a file.

But, since the OP did, I thought I'd point out that it's definitely
possible.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.