Class ZFileException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.ibm.jzos.ZFileException
- All Implemented Interfaces:
ZFileConstants, Serializable
A customized IOException to carry detailed native file error information.
If errno was non-zero, the result of strerror(errno) is available in errnoMsg.
The following codes are available from the C++ library __amrc.__code structure
if errno is non-zero.
Refer to the z/OS C++ Programming Guide Debugging IO Programs
for information
on when these codes apply and how to interpret these codes.
- getAbendCode()
- from __amrc.__code.__abend.__syscode
- getAbendRc()
- from __amrc.__code.__abend.__rc
- getFeedbackRc()
- from __amrc.__code.__feedback.__rc
- getFeedbackFtncd()
- from __amrc.__code.__feedback.__ftncd
- getFeedbackFdbk()
- from __amrc.__code.__feedback.__fdbk
- getAllocSvc99Info()
- from __amrc.__code.__alloc.__svc99_info
- getAllocSvc99Error()
- from __amrc.__code.__alloc.__svc99_error
- getCodeError()
- from __amrc.__code.__error; this 4-byte error code overlays the other fields with single code
- See Also:
-
Field Summary
Fields inherited from interface ZFileConstants
DEFAULT_EBCDIC_CODE_PAGE, DEVICE_DISK, DEVICE_DUMMY, DEVICE_HFS, DEVICE_HIPERSPACE, DEVICE_MEMORY, DEVICE_MSGFILE, DEVICE_OTHER, DEVICE_PRINTER, DEVICE_TAPE, DEVICE_TDQ, DEVICE_TERMINAL, DSORG_CONCAT, DSORG_HFS, DSORG_HIPER, DSORG_MEM, DSORG_PDS_DIR, DSORG_PDS_MEM, DSORG_PDSE, DSORG_PO, DSORG_PS, DSORG_TEMP, DSORG_VSAM, ERRNO_E_ABEND, ERRNO_E_DEFINEFILE, ERRNO_E_READERR, ERRNO_E_WRITEERR, ERRNO_EACCES, ERRNO_EILSEQ, ERRNO_EINVAL, ERRNO_EIO, ERRNO_EPERM, FLAG_DISP_MOD, FLAG_DISP_OLD, FLAG_DISP_SHR, FLAG_PDS_ENQ, LAST_OP_BSAM_BLDL, LAST_OP_BSAM_CLOSE, LAST_OP_BSAM_CLOSE_T, LAST_OP_BSAM_NOTE, LAST_OP_BSAM_OPEN, LAST_OP_BSAM_POINT, LAST_OP_BSAM_READ, LAST_OP_BSAM_STOW, LAST_OP_BSAM_WRITE, LAST_OP_C_CANNOT_EXTEND, LAST_OP_C_DBCS_SI_TRUNCATE, LAST_OP_C_DBCS_SO_TRUNCATE, LAST_OP_C_DBCS_TRUNCATE, LAST_OP_C_DBCS_UNEVEN, LAST_OP_C_FCBCHECK, LAST_OP_C_TRUNCATE, LAST_OP_HSP_CREATE, LAST_OP_HSP_DELETE, LAST_OP_HSP_EXTEND, LAST_OP_HSP_READ, LAST_OP_HSP_WRITE, LAST_OP_IO_CATALOG, LAST_OP_IO_DEVTYPE, LAST_OP_IO_LOCATE, LAST_OP_IO_OBTAIN, LAST_OP_IO_RDJFCB, LAST_OP_IO_RENAME, LAST_OP_IO_SCRATCH, LAST_OP_IO_SWAREQ, LAST_OP_IO_TRKCALC, LAST_OP_IO_UNCATALOG, LAST_OP_QSAM_FREEPOOL, LAST_OP_QSAM_GET, LAST_OP_QSAM_PUT, LAST_OP_QSAM_RELSE, LAST_OP_QSAM_TRUNC, LAST_OP_SVC99_ALLOC, LAST_OP_SVC99_ALLOC_NEW, LAST_OP_SVC99_UNALLOC, LAST_OP_TGET_READ, LAST_OP_TGET_WRITE, LAST_OP_VSAM_CLOSE, LAST_OP_VSAM_ENDREQ, LAST_OP_VSAM_ERASE, LAST_OP_VSAM_GENCB, LAST_OP_VSAM_GET, LAST_OP_VSAM_MODCB, LAST_OP_VSAM_OPEN_ESDS, LAST_OP_VSAM_OPEN_ESDS_PATH, LAST_OP_VSAM_OPEN_FAIL, LAST_OP_VSAM_OPEN_KSDS, LAST_OP_VSAM_OPEN_KSDS_PATH, LAST_OP_VSAM_OPEN_RRDS, LAST_OP_VSAM_POINT, LAST_OP_VSAM_PUT, LAST_OP_VSAM_SHOWCB, LAST_OP_VSAM_TESTCB, LOCATE_KEY_EQ, LOCATE_KEY_EQ_BWD, LOCATE_KEY_FIRST, LOCATE_KEY_GE, LOCATE_KEY_LAST, LOCATE_RBA_EQ, LOCATE_RBA_EQ_BWD, MODE_FLAG_APPEND, MODE_FLAG_READ, MODE_FLAG_UPDATE, MODE_FLAG_WRITE, OPEN_MODE_BINARY, OPEN_MODE_RECORD, OPEN_MODE_TEXT, RECFM_A, RECFM_B, RECFM_F, RECFM_M, RECFM_S, RECFM_U, RECFM_V, S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_ISGID, S_ISUID, S_ISVTX, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR, SEEK_CUR, SEEK_END, SEEK_SET, VSAM_TYPE_ESDS, VSAM_TYPE_ESDS_PATH, VSAM_TYPE_KSDS, VSAM_TYPE_KSDS_PATH, VSAM_TYPE_NOTVSAM, VSAM_TYPE_RRDS -
Constructor Summary
ConstructorsConstructorDescriptionZFileException(String fileName, String msg, int errno) Construct a ZFileException.ZFileException(String fileName, String msg, String errnoMsg, int errno, int errno2, int lastOp, byte[] amrc_code_bytes) Construct a ZFileException. -
Method Summary
Modifier and TypeMethodDescriptionintintintintbyte[]Deprecated.just for debuggingintgetErrno()intintintintintintGet a message string to decribe the exception.Answer the SYNAD message, or null if not present in the __amrc structureMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ZFileException
public ZFileException(String fileName, String msg, String errnoMsg, int errno, int errno2, int lastOp, byte[] amrc_code_bytes) Construct a ZFileException.- Parameters:
fileName- the name of the file opened by ZFilemsg- the message from the point where the error occurrederrnoMsg- the C library strerror(errno) messageerrno- the C library errnoerrno2- the C library errno2lastOp- the C library __amrc.__last_op valueamrc_code_bytes- the C library __amrc.__code structure bytes
-
ZFileException
-
-
Method Details
-
getMessage
Get a message string to decribe the exception. This includes the original source message from the detecting routine, as well as errno, errno2, and last_op if errno is not 0.- Overrides:
getMessagein classThrowable
-
getErrno
public int getErrno()- Returns:
- int - the value of the C library errno
-
getErrno2
public int getErrno2()- Returns:
- int - the value of the C library errno2
-
getErrnoMsg
- Returns:
- int - the value of the C library strerror(errno) message
-
getErrorCode
public int getErrorCode()- Returns:
- int - the value of the C library __amrc.__code.__error
-
getAbendCode
public int getAbendCode()- Returns:
- int - the value of the __amrc.__code.__abend.__syscode value, or zero if errno is 0.
-
getAbendRc
public int getAbendRc()- Returns:
- int - the value of the __amrc.__code.__abend.__rc value, or zero if errno is 0.
-
getFeedbackRc
public int getFeedbackRc()- Returns:
- int - the value of the C library __amrc.__code.__feedback.__rc
-
getFeedbackFtncd
public int getFeedbackFtncd()- Returns:
- int - the value of the C library __amrc.__code.__feedback.__ftncd
-
getFeedbackFdbk
public int getFeedbackFdbk()- Returns:
- int - the value of the C library __amrc.__code.__feedback.__fdbk
-
getAllocSvc99Info
public int getAllocSvc99Info()- Returns:
- int - the value of the C library __amrc.__code.__alloc.__svc99_info
-
getAllocSvc99Error
public int getAllocSvc99Error()- Returns:
- int - the value of the C library __amrc.__code.__alloc.__svc99_error
-
getFileName
- Returns:
- int - the filename that was opened by ZFile (the first argument to the ZFile constructor.
-
getLastOp
public int getLastOp()- Returns:
- int - the value of the C library __amrc.__last_op
-
getSynadMsg
Answer the SYNAD message, or null if not present in the __amrc structure- Since:
- 2.4.1
-
getAmrcBytes
Deprecated.just for debugging
-