To read using a partial key the remaining fields of the key structure need to 
be set to zero or blanks (or whatever is the 'base' value for each field).
For example, if the key is 3 numeric fields and you want the first record 
matching the first field of the key, set the 2nd and 3rd field in the key 
structure to zero.


-----Original Message-----
From: Adam Walker [mailto:adamwalker79@xxxxxxxxxxx]
Sent: Friday, January 07, 2005 5:50 AM
To: c400-l@xxxxxxxxxxxx
Subject: [C400-L] using _Rreadk with a partial key - any examples?

Hi there,
I am accessing a logical file keyed over the first four fields.  however, I 
only know the first field of the key that I need to access.  This field is a 
unique seq number so should be sufficient to locate the correct record, and the 
documentation for _Rreadk states it can use a partial key, but I am not able to 
successfully retrieve a record unless I build the complete key (which I can do 
in test, but not reality).
Ideally there would be a logical keyed over just the unique seq number, but 
there isn't and I don't want to add one unless theres no other way.
Is there anyone out there who has used _Rreadk with a partial key successfully? 
 would you mind providing an example of how the key was built (compared to a 
complete key) and the _Rreadk params?
thanks to anyone who can help,
- Adam

 ALL-NEW Yahoo! Messenger - all new features - even more fun!  
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...

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

This mailing list archive is Copyright 1997-2020 by 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].