MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2014

Re: Logical Files as path for program independence (was RE: IBM i 7.2 & Power 8)



fixed

On Fri, Apr 25, 2014 at 4:52 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Your memory was/is faulty :)

Hmm... well, I freely admit my memory isn't what it used to be, but
what I stated was actually correct:

On Fri, Apr 25, 2014 at 4:25 PM, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

Perhaps my memory is foggy (this situation hasn't come up for me in
quite a while), but in order for logicals not to need "refreshing"
(for us that always meant recompiling, but perhaps you can get away
with just CHGLF?) the LF has to be defined with LVLCHK(*NO), doesn't
it?

I mean, just take that literally, and it's true: The *logical file*
needs to be refreshed if the underlying physical file is changed. I
know this because I tried it just now. The system (6.1) wouldn't let
me replace the PF because the LF, even with its own explicit format,
was still around.

I know you can get around this if you disable level checks, but no one
seemed to be commenting on that. Are there other ways to avoid
refreshing the *logical file*?

Yes, I realize the OP was talking about avoiding recompilation of the
RPG; and I get that you can avoid recompiling the RPG if it references
the LF. I'm not contesting that. What I'm contesting is this:

On Fri, Apr 25, 2014 at 3:27 PM, Chris Bipes <chris.bipes@xxxxxxxxxxxxxxx>
wrote:

That is exactly why programmers created Logical Files with just the fields
they needed for their program. You could change the physical but the
logical would remain unchanged.

Why I am focused on the logical is that Chris said it would "remain
unchanged". Well, OK, if you used DDS to create it, the DDS is
unchanged. But you still have to recompile it (or some equivalently
annoying refresh). And if you have to refresh it, then how is that
materially better than having to recompile an RPG program (whose
source, like the LF's, is unchanged)?

The thought that came to my mind was that maybe when you change a PF,
it can affect lots of RPGs (but typically not a massive number of
LFs). And that's when I mentioned you could automate the
recompilation. (To be fair, we don't have any established system in
place for this where I work. On the rare occasion that I have to
recompile a lot of programs, I whip up an ad-hoc script to do it.)

John





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact