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




If this is to be a permanent type file, there are a couple of things one can do 
if one must get it as if it were one record. The solution of using OPNQRYF has 
been mentioned where you can combine multiple files, but I prefer SQL (way 
much), and then maybe a subprocedure in a service program. 

(1) Someone who does more SQL can verify or correct this, but I believe you can 
create an SQL View that joins each header file with its matching detail file in 
a SELECT statement, and then using the UNION keyword you could combine distinct 
SELECT-FROM-Where for each of the unique header/detail files. However, I'm not 
sure this would be permanent. 

(2)I abhor complicating up the logicals, but I think you could define one 
logical join file over the first pair of physical files, then use ADDLFM to add 
more logical file members directed to the other physical files. (I hate this 
solution, because maintaining just multiple-member PF's is is yech enough). 

(3)A service program with procedures that return data in order to the calling 
program. It would involve more programming the first time out of course, and 
you would have to simulate some of the RPG matching records, but it's doable, 
and after the first time it would be just as easy as using one file name. 
(Actually maybe easier, with only one (service) program to update for changes 
in the files or file names..) 

--Alan

+++++++++++++++++++
...I have 4 pair of files, each pair consists of a HDR and a DTL file, with a 
one to many correlation, for example:-
LIBRARY1/HDRA & LIBRARY1/DTLA
LIBRARY2/HDRB & LIBRARY2/DTLB
LIBRARY3/HDRC & LIBRARY3/DTLC
LIBRARY4/HDRD & LIBRARY4/DTLD

A join logical can be built over each of these files, for example
LIBRARY1/HDRADTLA
LIBRARY2/HDRBDTLB
LIBRARY3/HDRCDTLC
LIBRARY4/HDRDDTLD
each of these HDR files has the same DDS layout as the other HDR files
each of these DTL files has the same DDS layout as the other DTL files
each of the join logicals has the same DDS layout as the other join logical
files

My question is:-
is there a way to create ONE logical from these four join logical files?


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.