5 pts.
 How i can create LF View To More than One Library?
how i can create LF View To More than One Lib.

Software/Hardware used:
iSeries (AS/400) OS/400 V5R2
ASKED: Sep 1, 2010  7:47 PM GMT
UPDATED: September 2, 2010  1:01:35 AM GMT
24,710 pts.

Answer Wiki:
An LF is a view over one or more PF.
The LF can be created in any library.
What is it you are trying to do?
Have a view over a single file or multiple files?
If it is multiple, your LF you would need to have some value(s) to JOIN the PFs.
You could have multiple formats.
If you need a more detailed answer, please let us know exactly what you are trying to accomplish.
Last Wiki Answer Submitted:  Sep 1, 2010  8:50 PM (GMT)  by  CharlieBrowne   24,710 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

Are you refering to an SQL view to be used with SQL commands or a native Ligical file which would be used in RPG/COBOL reads.
If its SQL then you would do it with a union statement
As
Create view myview as
Select flda, fldb from lib1/file1
union
Select flda, fldb from lib2/file1

while this can be done in a native lf with multi-formats.
The native LF over multiple libraries can lead to some serious backup and restore issues.
Phil

 36,400 pts.

 

It can be done as a native DDS JOIN LF, a multi-format LF or simply as a normal LF over multiple data members. Or it can be done as a SQL DML VIEW that JOINs or UNIONs multiple underlying TABLEs and/or VIEWs or as a simple cross-product “join”.

There are multiple possibilities with native or SQL methods. The appropriate technique might require seeing a sample of the tables and a description of final result.

Tom

 66,765 pts.