Hello everyone!

I encountered a problem - the _Rwrite does not set the dup_key in _RIOFB_T, when writing a duplicate unique value to unique keyed file.
Tried on several servers, same result everywhere. Has anyone encountered something similar?

My code is simple:

#include <recio.h>
#include <stdio.h>
#include <errno.h>

void main(void) {
char buffer[9999];
_RFILE *file1 = _Ropen("<some file keyed with UNIQUE=Yes>", "rr+,dupkey=Y");
_RFILE *file2 = _Ropen("<same file as here ^>", "rr+,dupkey=Y");
_RIOFB_T *fb;

fb = _Rreadf(file1, buffer, file1->buf_length, __NO_LOCK);
fb = _Rwrite(file2, buffer, file2->buf_length);

// Joblog says "Duplicate key on access path"
// fb->num_bytes==0
// BUT: fb->dup_key==0!
// Where I'm wrong?????

return;
}



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.