com.ibm.jzos

Class ZFileException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • com.ibm.jzos.ZFileException
  • All Implemented Interfaces:
    ZFileConstants, java.io.Serializable


    public class ZFileException
    extends java.io.IOException
    implements ZFileConstants
    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:
    Serialized Form
    • Constructor Detail

      • ZFileException

        public ZFileException(java.lang.String fileName,
                              java.lang.String msg,
                              java.lang.String errnoMsg,
                              int errno,
                              int errno2,
                              int lastOp,
                              byte[] amrc_code_bytes)
        Construct a ZFileException.
        Parameters:
        fileName - the name of the file opened by ZFile
        msg - the message from the point where the error occurred
        errnoMsg - the C library strerror(errno) message
        errno - the C library errno
        errno2 - the C library errno2
        lastOp - the C library __amrc.__last_op value
        amrc_code_bytes - the C library __amrc.__code structure bytes
      • ZFileException

        public ZFileException(java.lang.String fileName,
                              java.lang.String msg,
                              int errno)
        Construct a ZFileException.
        Parameters:
        fileName - the name of the file opened by ZFile
        msg - the message from the point where the error occurred
        errno - the C library errno
    • Method Detail

      • getMessage

        public java.lang.String 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:
        getMessage in class java.lang.Throwable
      • 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

        public java.lang.String 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

        public java.lang.String 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

        public java.lang.String getSynadMsg()
        Answer the SYNAD message, or null if not present in the __amrc structure

        Since:
        2.4.1
      • getAmrcBytes

        public byte[] getAmrcBytes()
        Deprecated. just for debugging
� Copyright IBM Corporation 2005, 2022.