× 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.



I have a huge datafile that is read for a monthly file extract. This new field
is needed so that a record with a different field, but same content can connect
with this record.

Basically this process:

Read file. I need to determine if another record has that key field in a non
keyed position. If it does, I need to check another file usimg another field
from that record. The simplest(?) idea I have is to build a new LF which
includes the non keyed field as a key field and the keyed field as a non keyed
field. I'm confused trying to describe it in words. How does this look:

Key link
1
2 1
3
4
5 6
6

When key 2 is read, it points back to key 1. But, I need to know, when reading
key 1, whether the recod in a third file that key 2 points to contains a
specific value. If it does, then I bypass that record for the export.

The program is written in fixed format RPG IV. The key field is named ACCT, and
the link is named PARENT.

Rather than kludging a LF to do this , I would like to use SQL to fetch the
related record. But, I have never done embedded SQL. Can you show me how I
can search the same file on a nonkeyed field? This would not be done for all
records. Only when a link was suspected to exist. Notice that key 2 points to
key 1, and key 5 points to key 6. This is in the database. The other records
have zero for the link field, but I showed it as blank to make it a little
cleaner.

John McKee


Quoting Alan Campin <alan0307d@xxxxxxxxx>:

Yes, what I call a field select logical. You just specify a different record
name and specify the fields that you want to include.

I used to do it give me database independence but was a pain and SQL is so
much better.

On Thu, Jun 4, 2009 at 3:20 PM, John McKee <jmmckee@xxxxxxxxxxxxxx> wrote:

I'm still researching this. My distant memory says (could be very wrong)
that a
LF can be designed to only include the specific fields from the PF. But, I
can't remember if this is true, or how to do it. I have a PF with 400+
fields.
I only need maybe 5 of those fields.

Is is possible to create a LF that has two key fields and three other
fields
from the PF?

John McKee

--
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.


--
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.

This thread ...

Follow-Ups:
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.