|
I think that might cause an error as: 1)TICKET is the field that exists in both files, leaving TICK as undefined and 2) TRPTOPAY would be file 1, TRPMASTR would be file 2. TRY this: OPNQRYF FILE((TRPTOPAY) (TRPMASTR)) FORMAT(TRPTOPAY) + QRYSLT('STATUS *EQ "5"') + JFLD((TRPTOPAY/TICK TRPMASTR/TICKET)) + JDFTVAL(*NO) MAPFLD((TICKET '2/TICKET') (TICK '1/TICKET')) jw - - - - -- -- - - - -- Date: Fri, 16 Jun 2000 10:41:41 -0400 From: Mark Walter <mwalter@netrax.net> Subject: RE: OPNQRYF - duplicate field name error Try: OPNQRYF FILE((TRPTOPAY) (TRPMASTR)) FORMAT(TRPTOPAY) + QRYSLT('STATUS *EQ "5"') + JFLD((TRPTOPAY/TICK TRPMASTR/TICKET)) + JDFTVAL(*NO) MAPFLD((TICKET '1/TICKET')) - -----Original Message----- From: David Prowak [SMTP:dprowak@ci.syracuse.ny.us] Sent: Wednesday, June 14, 2000 6:13 PM To: midrange list Subject: OPNQRYF - duplicate field name error 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 +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.