|
Hi, Dave. Here it is what happens on my
AS/400.
File PF1
R RPF
A C001
A C002
A C003
File PF2
R RPF
A C001
A C002
A C003 Please note that you must use the same name for the
record format of PFs.
LF looks like
that:
A
UNIQUE
A R RPF
PFILE(PF1 PF2)
A K
C001
The COBOL program looks
like:
SELECT LF ASSIGN TO DATABASE-LF
and so on
FD LF.
COPY DDS(or DDR) -ALL-FORMAT and so
on REPLACING == 05 == BY == 01==
The compiler expands the statement as follows:
01 LF-RECORD pic
X(99)
01 RPF REDEFINES LF-RECORD
06 C001
PIC
06 C002
PIC
01 RPF REDEFINES LF-RECORD (a second
time)
06 C001
PIC
06 C002
PIC
The COBOL program (ILE) compiles, but i don't think it
'll work and suit your needs (as you may see, the two PF share the same phisical
area in memory).
I think you should design your database file in a more
relational - compliant model instead.
Bye Domenico Finucci
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.