1

The writer class opens a file (myfile) in mode and looks-up for a record using a key. Once the record is found, an update() is invoked. I get the following exception when the update() call is getting executed

fupdate() failed; EDC5065I A write system error was detected. (errno2=0xC0500090); errno=65 errno2=0xc0500090 last_op=115 errorCode=0x80060

This file is opened in the "rb,type=record" mode in open() method of the writer and is closed in the close() method of the writer.

The error happens when the writer is getting executed for the very first chunk of the job.

What could be the problem ?

yathirigan
  • 5,619
  • 22
  • 66
  • 104
  • 1
    Did you try logging the results of calling the individual fields/getters of the [ZFileException](https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.zsecurity.api.80.doc/com.ibm.jzos/com/ibm/jzos/ZFileException.html) and then looking up the various codes in the [z/OS XL C/C++ Programming Guide](https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.cbcpx01)/iodebug.htm – Scott Kurz Sep 21 '17 at 02:36
  • For record I/O, z/OS XL C/C++ allows only the use of fread() and fwrite() to read and write to files. https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.cbcpx01/hdrec.htm Could this be the reason – Fritz Sep 21 '17 at 13:34
  • 1
    I believe opening it 'rb' opens it for read-binary. To do an update you'd need to open it rb+ to get read/write. Doc for all the modes is here: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxbd00/fopen.htm And there's a VSAM update using ZFile here: https://github.com/zsystems/java-samples/blob/master/vsam/file/UpdateKsdsRecords.java – DFollis Sep 21 '17 at 17:23

0 Answers0