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



Alan Shore wrote:

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.


If you use ALTER TABLE, it will get an exclusive lock of the entire file
for the duration of the operation, period. There is no workaround I
know of for ALTER TABLE's exclusive locking, because sooner or later the
same thing has to be done -- the DB has to add a column (aka field) to a
table (aka file) and I don't think there are non-exclusive
implementations, file-wide, of such a function on i.

As for the recompile issue, to achieve the boss' goals, the answer is to
re-write everything in dynamic SQL. However, this is not obviously a
good idea. Your company's mileage may vary though.


Larry Loen
www.applicationperformancegroup.com





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.