Alex

Check errno if bytes written == 0. It will give you the reason. That way a successful write will not check for an error.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Alexei Baranov <alexei.baranov@xxxxxxxxxx>
Sent: Friday, December 13, 2024 8:38:09 AM
To: Chris Hird <chrish@xxxxxxxxxxxxxxxxxx>; Bare Metal Programming IBM i (AS/400 and iSeries) <C400-L@xxxxxxxxxxxxxxxxxx>
Subject: Re: [C400-L] _Rwrite and _RIOFB_T->dup_key

Chris, bytes_written==0 points to a symptom - unable to write record to file, but I need to know the cause. exception_handler for _C2_MH_NOTIFY CPF5034 explain the reason - duplicate key.

Thank you for point to CHGMSG to remove message from the job log

-------- Original Message --------
Subject : [C400-L] _Rwrite and _RIOFB_T->dup_key
From : Chris Hird chrish@xxxxxxxxxxxxxxxxxx
To : "Bare Metal Programming IBM i (AS/400 and iSeries)" <C400-L@xxxxxxxxxxxxxxxxxx>
Cc :
Date : Friday, December 13, 2024 16:30

Just check fp->bytes_written against what you expected to be written. Then use the CHGMSG API to remove from the job log?

Chris

Get Outlook for iOS<https://aka.ms/o0ukef>



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.