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



On Fri, Sep 2, 2011 at 9:24 PM, Morgan, Paul <Paul.Morgan@xxxxxxxxxxx> wrote:
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.

I think the base RPG language isn't well-suited for that level of
dynamicism. The compiler needs to account for all the names and their
types (including their size). If you wrote a program that used a
name, and that name either disappeared or changed its type after you
compiled it, then what was the point of compiling it? This is the
very thing that static typing proponents point to as an advantage of
precompiled programs.

The fact that you can embed SQL *is* the mechanism by which RPG allows
dynamic data definition. Frankly, I don't think it's worth mangling
RPG into more of a Frankenstein's monster than it already is.

If you are after full dynamic typing, then you are probably better off
with another language. One that is not statically typed. SQL itself,
for example. If you prefer a dynamic procedural/object-oriented
language, there is iSeries Python.

John

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.