On Wed, Nov 18, 2015 at 2:59 PM, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:
For me, at least, there's another element that's pretty compelling: my
cross reference tool doesn't know about the IFS, Python, Java, PHP or my
sed and grep scripts. When I need to make a change to a table, I very
often need to visit the existing programs. Every RPG program that uses
a given file gets on the list of items to look at. Unfortunately, if I
move the I/O outside of RPG, I can't easily find it.
Very understandable. Being able to get cross references can be invaluable.
But at least *some* of the need for that tooling is reduced when you
use dynamic languages, including SQL. Typically, existing field
references in a dynamic language do not need to be changed unless the
field is changing its name, being removed completely, or is changing
from a numeric type to a character type or vice versa.
Regardless, it's definitely still good to know everything that
*modifies* a table, so maybe there are a couple of measures/strategies
one could use for integrating dynamic languages into the mix. Off the
top of my head:
(1) Refrain from modifying tables with anything that isn't tracked by
your cross reference tool. Use a tracked gatekeeper/helper program,
called from your dynamic code, if necessary.
(2) Always call your untracked programs from tracked programs, and
throw in "no-op" references to make them show up in your tool. For
example, call Python from RPG, and any tables modified by the Python
program should also be output-capable (but not necessarily actually
opened) in the calling RPG. (I haven't tried this myself, but it's
partly inspired by stuff I've seen in RPG code before. It's also
partly inspired by tricks like throwing a closing brace into a comment
to make simpleminded text editors match braces correctly after you've
commented out some code.)
I may have to file this one in the 'I only have a hammer' file. :-/
Almost all of us are susceptible to the hammer problem. I definitely
am. But some hammers are more "powerful" (in that they are more
successful at turning more problems into nails) than others. I think
we all like to believe that the hammers we already have are the best
ones.
John Y.
As an Amazon Associate we earn from qualifying purchases.