Create a view to do the join, then use QRYSLT to filter and sort as needed...
-Eric DeLong
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Robert Ostrowski
Sent: Monday, April 04, 2011 10:29 AM
To: Midrange Systems Technical Discussion
Subject: QRYSLT on two files
I need to write a QRYSLT statement (OPNQRYF) in a CL program to select
records from one file
that match one or more records in another file.
The PROFILE file contains two fields I need to look at: Division and
Region
Many divisions can belong to one region.
Division Region
AZP SW
COM SW
NVG SW
FLF SE
GAA SE
NJJ NE
NCC NE etc...
The REGISTER file contains a job number and division code.
If someone wants to print a report by region, I need to look at
any records in the REGISTER file with a division code that is
assigned the corresponding region in the PROFILE.
Any Suggestions?
Bob Ostrowski | Senior Programmer/Analyst
TRAINOR GLASS COMPANY | National - IT
11901 S. Austin Ave. | Alsip, IL 60803
T 708.293.4218 | F 708.293.6218
bob.ostrowski@xxxxxxxxxxxxxxxx <mailto:bob.ostrowski@xxxxxxxxxxxxxxxx>
| www.trainorglass.com <
http://www.trainorglass.com>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.