Alan,

If you use SQL instead of RPG's RLA op-codes, you don't have to
recompile anything.

Another option, if you want to continue to use RPG's RLA, is to have
all your RPG program access through a logical file with an explicit
format, ie. define all the fields again. This way you can change the
physical without changing any logicals and thus without requiring any
recompiles. You could easily move to such a configuration simply by
renaming the current physical and creating a new logical with the name
of the old physical. (Note: I recommend using SQL DDL to define the
physicals and logicals)

Lastly, if you had a CMS, the CMS should be able to automatically
recompile anything that needs to be recompiled.

I'm pretty sure there is no RDBMS on the planet that will let you
change a file while it is in use.

Charles

On Sat, May 9, 2009 at 2:05 PM, Alan Shore <AlanShore@xxxxxxxx> wrote:
Thanks for your reply Neil
What you have described can be somewhat circumvented by using level check
of *NO (audible gasps and shouts of "heretic") and adding only alpha fields
(even if a numeric field is what is desired)
The boss's boss wants a quicker turnaround of projects, so much so that we
have been asked to look into other languages available on the AS/400 (EGL
is the first one and that might mean another thread in and of itself)
He is tired of having to wait to change/recompile  ALL the applicable
programs for a change to a file, then having to push the appropriate people
off the system so that these changes can be applied to the files on the
production system


Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

midrange-l-bounces@xxxxxxxxxxxx wrote on 05/09/2009 01:52:52 PM:

Let me get this straight.

I am an RPG program that has an internally described file open that the
operating system has checked has the same format level ID as the file I
was
compiled against.

And you now want to change that file so that the program will either A)
Fall
over in a heap on the next read or write operation or B) continue to
process
as normal but silently corrupt data all over the place.

I really would advise your bosses, bosses that want he wants is a bad
idea!!!!

Can we have the context of why your boss wants this? There might be a
less
risky solution.

That said I'll be shocked if anyone knows how to do want you need :-)

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: 09 May 2009 18:18
To: Midrange Systems Technical Discussion
Subject: Stupid question of the century

Hi guys
I've just been asked the following question by my boss's boss
Is there anyway to add new fields (columns) "on the fly" to an existing
file, without having an exclusive lock on that file.
In other words, the file is still being used while the field is added
I know that chgpf is out of the question (unless someone proves me
wrong).
I know that SQL is also out of the question (ALTER TABLE x ADD EXTRAFIELD
DEC(7, 2) NOT NULL DEFAULT 0) - again unless someone proves me wrong
If anyone knows of any way, any language, any procedure, any function to
achieve this, please drop me a line.

Thanks in advance


Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.