IBM Support

Errors iserrno = 13 and isstat = 9,0,3,7 when trying to open an .idx file for read-only

Troubleshooting


Problem

You try to open an .idx file for read-only using a call similar to this: isopen(" your_filename", ISINPUT + ISMANULOCK + ISFIXLEN) but you see these errors: iserrno = 13 isstat = 9,0,3,7

Symptom


iserrno = 13 is a reference to OS error 13:
-13 Permission denied.

isstat = 9,0,3,7 is status information returned from C-ISAM. The isstat code is comprised of four separate codes named isstat1, isstat2, isstat3, and isstat4. Here is the meaning of these specific statuses

isstat1 valueisstat2 valueIndication
90No further information is available.

isstat3 valueisstat4 valueIndication
37The mode parameter specified in the isopen() function is not allowed for the file.

For more information regarding isstat look in Appendix C of the C-ISAM Guide:
http://publib.boulder.ibm.com/epubs/pdf/7897b.pdf

Cause


The .idx file does not have write permission at the operating system level. Some internal operations that are part of the mechanism for protecting the integrity of the file in a concurrent environment require RDWR_LOCKs to be placed. Specifically, a call to the operating system function fcntl() is made with one of the parameters specifying a "write lock". This write lock does not change the file but the OS call will fail because the file is not writable.

Resolving The Problem

Change the permission on the .idx file to allow writes in addition to reads.

Related Information

[{"Product":{"code":"SSGKNY","label":"Informix C-ISAM"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
23 June 2018

UID

swg21409415