|
Hi,
I'm using an Opnqryf to join 2 files and select
some recs from the joined file.
The problem is that the field that I'm joining on
has the same name in each file, so that I'm
getting a "field TICKET found in more than one
record format" error.
I've tried renaming the field using MAPFLD, but I
still get the same error.
How can I fix this?
Here's the code using the MAPFLD:
OPNQRYF FILE((TRPTOPAY) (TRPMASTR)) FORMAT(TRPTOPAY) + QRYSLT('STATUS *EQ "5"') + JFLD((TRPTOPAY/TICK TRPMASTR/TICKET)) + JDFTVAL(*NO) MAPFLD((TICK 'trptopay/ticket')) Here's the one without my failed attempt with
MAPFLD:
OPNQRYF FILE((TRPTOPAY) (TRPMASTR)) FORMAT(TRPTOPAY) + QRYSLT('STATUS *EQ "5"') + JFLD((TRPTOPAY/TICKET TRPMASTR/TICKET)) + JDFTVAL(*NO) TIA,
Dave
|
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.