DSPPGMREF to an *OUTFILE, use SQL on the resulting file:
select distinct whlib, whpnam
from outfile a
where exists (select 1
from outfile b
where b.whotyp = '*FILE'
and b.whlib = a.whlib
and b.whpnam = a.whpnam
and b.whfnam like 'FILEA%')
and exists (select 1
from outfile b
where b.whotyp = '*FILE'
and b.whlib = a.whlib
and b.whpnam = a.whpnam
and b.whfnam like 'FILEB%');
This of course assumes that your logical files have a name that's similar
to the physical.
Ours do: FILEAPF would have logical files FILEAL0, FILEAL1, etc.
HTH,
Peter Colpaert
Software Engineer, Consumer Luminaires
The information contained in this message is confidential and may be
legally privileged. The message is intended solely for the addressee(s).
If you are not the intended recipient, you are hereby notified that any
use, dissemination, or reproduction is strictly prohibited and may be
unlawful. If you are not the intended recipient, please contact the sender
by return e-mail and destroy all copies of the original message.
Adam West <adamster@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/06/2008 14:16
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
rpg400-l@xxxxxxxxxxxx
cc
Subject
2 files lookup
HI Is there any way to determine in which programs, file A and file B both
are used? also for any logicals would be a plus.
TIA,
Adam
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.