|
Wouldn't this be better served by doing the following in SQL?
select * from rob/x1
union (select * from rob/x2)
For example if rob/x1 contains:
COLA COLB
xa1 xb1
xa2 xb2
and rob/x2 contains:
COLA COLB
ya1 yb1
ya2 yb2
You'll get:
COLA COLB
xa1 xb1
xa2 xb2
ya1 yb1
ya2 yb2
If you need a sample program to process this data, complete with external
field definitions, fetch loop and whatnot, shout back. What the heck I
created the tables and the join using SQL just to answer your question,
what's a little extra time? OPNQRYF is just so much cludgier.
However if you will only give up OPNQRYF after you've been terminated for
failure to learn then you could try creating a logical over both files and
access the new logical with OPNQRYF. Not very flexible.
Rob Berendt
==================
Remember the Cole!
"Shea, David"
<DShea@arctools.com To:
"'midrange-l@midrange.com'" <midrange-l@midrange.com>
> cc:
Sent by: Subject: OPNQRYF - join
identical files w/o MAPFLDs???
owner-midrange-l@mi
drange.com
01/22/01 12:04 PM
Please respond to
MIDRANGE-L
I'm attempting an OPNQRYF with two identical files in different libraries.
The record formats are identical, as are the field names. I am joining the
files based on a couple fields. I am telling the opnqryf to use one of the
record formats from one of the files.
The OPNQRYF command bombs because it wants the MAPFLD parameter specified.
Since the two files are identical, there are LOTS of duplicate file names.
Is there any way of getting around specifying a MAPFLD for each and every
field in the file? First, that would be a pain in the ...neck... and
second, it's limited to 50 fields.
Any ideas?
+---
| 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
+---
+---
| 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-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.