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



James,

In the F-spec you just specify the key length (20) and type (A). Type A (char) might seem strange in your case, but for a compound key you'll need a data structure for random access. You can specify the starting location of the key with the KEYLOC keyword, but I don't think this has any use.

If you need to chain to the file you have to define a data structure; in your case it will have to be 20 long and should contain an 11 byte zoned field an a 9 byte zoned field.

Joep Beckeringh


James H H Lampert wrote:

Something I don't quite get, in the ILE RPG docs:

I have a file with two non-adjacent keys.
Is it possible to open this file from ILE RPG as program-described (to
avoid level-check issues without overrides, and without disabling level
checking for other programs using the file), and chain it on both keys?

How do I code this?

For argument's sake, I'll call the first key "foo"; it's 11 bytes of zoned
decimal, starting at byte position 49 in the record. I'll call the second
key "bar"; it's 9 bytes of zoned decimal, starting at byte position 39 in
the record. I'll call the intervening byte (byte position 48) "baz."

And please note that, now that I have a strictly RPG query (as opposed to
a query that was only incidentally involving an RPG program), I have put
it on the RPG list, rather than the MIDRANGE list.

--
JHHL


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.