|
Greetings: We use logical files built over physicals in multiple libraries, and have since early in V3, I think. Over a decade, for sure. They work fine. However, there is a "gotcha" in specific circumstances. When restoring a library from tape backup to a different library, logicals built over multiple physicals may be recreated with "unexpected" access paths. This can be quite dangerous if, for example, a test or development library is recreated periodically from a backup of a library containing live data. Some of the logicals in the test library end up built, in whole or in part, on live files. Everything looks fine for a few days, or weeks, then *WHAM*.... We have convoluted procedures to catch and fix this. I would love to have a simpler solution. Regardless, it is something to watch for. Darrell Darrell A. Martin - 754-2187 Manager, Computer Operations dmartin@xxxxxxxxxxxxx Jerry Adams <jerry@xxxxxxxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 06/21/2006 08:27 AM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc Subject Re: Merging Files Vern, I set up a quick test LF. Physicals in multiple libraries. Worked fine. Even processed a document to add to the current year's history and it showed up in the multi-format LF. The only problem was a much older PF (2001) that is missing a field common to all of the other PFs I think I can live without flashbacks to 2001! So life is (temporarily) good. Thanks. * Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> Vernon Hamberg wrote:
Hi Jerry I'm trying to remember if this is possible - have a single format in the LF but name several files in the CRTLF command - not sure if it can cross library and file boundaries - it can definitely merge several members of the same file in one logical. All the Pfiles have to have the same format, of course - I think. HTH Vern At 07:30 AM 6/21/2006, you wrote:Thanks to everyone. I do have a project to merge all of the tables into a single table. Legacy code, especially queries, are going to be a pain. I definitely need to get into SQL more; I pull out Conte and Cravitz's book whenever there's down time. I use pretty simple statements, such as Select and Update, frequently but need to become better versed in the subject. I'll read up on the Union as soon as possible. Scott's solution for legacy code was what I was trying to do, except that I had defined multiple record formats, such as R FORMATR PFILE(PF1) K KEY R FORMATR PFILE(PF2) K KEY Which was the way the DDS manual and InfoCenter both illustrated it. But their examples were merging, say, an Order Header and Order Details, not identical tables. The DDS compiler choked on that, obviously. Again, thanks. * Jerry C. Adams *IBM System i Programmer/Analyst B&W Wholesale Distributors, Inc.* * voice 615.995.7024 fax 615.995.1201 email jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx> John Candidi wrote:Not sure how many files are in each library and not sure of the size of
your
files so this may not be an option, but I have some files like that
that I
wrote a query for that appends the file for one year to another year
and I
write the year to the beginning of each file. In the end, I have one
big
file with multiple years. Of course, you can always create a view
across the
years like someone mentioned -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams Sent: Tuesday, June 20, 2006 3:51 PM To: Midrange-L Subject: Merging Files We have separate libraries for each year's history. In order to
perform
inquiries across multiple years rather than multi-defining each PF in the program (which, honestly, is what I have been doing), I would like to read them as a single file. These tables have the same identical layout (fields, format names, file names); just in different libraries. I tried using a multiple format
LF
but, naturally, it blew off because the record format names are the
same.
Is there any way to read these two physical files via a single file statement, or am I just spinning my wheels in the sand here?-- 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 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.