com.ibm.jzos
Class ZFileException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by com.ibm.jzos.ZFileException
All Implemented Interfaces:
java.io.Serializable

public class ZFileException
extends java.io.IOException

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 Summary
ZFileException(java.lang.String fileName, java.lang.String msg, int errno)
          Construct a ZFileException.
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.
 
Method Summary
 int getAbendCode()
           
 int getAbendRc()
           
 int getAllocSvc99Error()
           
 int getAllocSvc99Info()
           
 int getErrno()
           
 int getErrno2()
           
 java.lang.String getErrnoMsg()
           
 int getErrorCode()
           
 int getFeedbackFdbk()
           
 int getFeedbackFtncd()
           
 int getFeedbackRc()
           
 java.lang.String getFileName()
           
 int getLastOp()
           
 java.lang.String getMessage()
          Get a message string to decribe the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 to the ZFile constructor.