× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Small 'point of information' Rick.  SQL allows you to create a logical, 
selecting fields and records with CREATE VIEW.  However a logical to order 
records must be done with CREATE INDEX.  And the wonderful functions of 
these two statements do not overlap.  So you can't even do the very 
limited function available in DDS to sort upon a fields from a single file 
in a join logical.  But with proper indexes built, and the data 
manipulation of SQL available within your programs it is not as critical 
as it would be if you were limited to only F specs.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




"Chevalier, Rick" <Rick.Chevalier@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/18/2003 09:20 AM
Please respond to RPG programming on the AS400 / iSeries
 
        To:     "'RPG programming on the AS400 / iSeries'" 
<rpg400-l@xxxxxxxxxxxx>
        cc: 
        Fax to: 
        Subject:        RE: keys on 2 joined files?


Chris,

A couple people have mentioned using SQL as a solution.  If SQL is 
available
to you as an option you might want to check into creating an SQL view. 
This
allows you to join multiple files together, select records on any field(s)
from the joined files and order the result set any way you want.  It will
look like a logic file to your  RPG programs.  Performance will depend on
the size of the files being joined, selection and join criteria, existing
indexes over the joined files, and iSeries model you are running on.  The
underlying SQL statement is executed whenever the view is accessed.  We 
have
one here that takes several seconds to display using DBU on our 
development
iSeries model S30 but performs comparable to DDS based physical and 
logical
files on our production iSeries model 890.

HTH,

Rick

-----Original Message-----
From: WyvernGod@xxxxxxx [mailto:WyvernGod@xxxxxxx]
Sent: Monday, March 17, 2003 8:36 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: keys on 2 joined files?

Hello new guy here with a migraine starting problem

OK here is my problem.. i need to have a logical of 3 joined files ... the
contract master, client relation master, and the client master. the 
problem
is the contract and client master bother have something i need to sort 
with.
In contract i need the company code and employee location, then the client
name from client master, then the policy number from contract. every thing 
i
try comes back in error and suggestions on how I can do this?  I'm trying 
to
have these come out by name but in order for the program to work they myst
also be sorted by the employee location.

Thanks,
Chris
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.