DbtuTools project
Java Library

org.dbtutools.DbtuTools.core.db2
Class DiagLog

java.lang.Object
  |
  +--org.dbtutools.DbtuTools.core.db2.DiagLog

public class DiagLog
extends java.lang.Object

Wrapper class, implementing db2diag.log file related stuff. It cannot be instantiated.

Author:
Daniel Scheibli <daniel.scheibli at edelbyte.org>

Field Summary
static java.lang.String FFFF_TOKEN
          Constant holding a special token for the hexadecimal code, found within the db2diag.log file.
 
Method Summary
static java.lang.String toInternalReturnCode(java.lang.String oParamTokenA, java.lang.String oParamTokenB)
          Converts a given hexadecimal code found in the db2diag.log file into an DB2 Internal Return Code.

Remark: Please notice; the hexadecimal code could represent a SQL Message Code as well.
static int toSqlCode(java.lang.String oParamTokenA, java.lang.String oParamTokenB)
          Converts a given hexadecimal code found in the db2diag.log file into an SQL Message Code.

Remark: Please notice; the hexadecimal code could represent a DB2 Internal Return Code as well.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FFFF_TOKEN

public static final java.lang.String FFFF_TOKEN
Constant holding a special token for the hexadecimal code, found within the db2diag.log file.
Method Detail

toInternalReturnCode

public static java.lang.String toInternalReturnCode(java.lang.String oParamTokenA,
                                                    java.lang.String oParamTokenB)
                                             throws java.lang.NumberFormatException,
                                                    java.lang.NullPointerException
Converts a given hexadecimal code found in the db2diag.log file into an DB2 Internal Return Code.

Remark: Please notice; the hexadecimal code could represent a SQL Message Code as well. For more information about how to interpret the db2diag.log, please have a look into the DB2 Documentation - Troubleshooting Guide.
Parameters:
oParamTokenA - The String holding the first (4 digits long) token.
oParamTokenB - The String holding the second (4 digits long) token.
Returns:
The calculated DB2 Internal Return Code (in upper case).
Throws:
java.lang.NumberFormatException - For the case, that the given tokens has an invalid format or contains unexpected characters. If none of the tokens match FFFF_TOKEN, the exception is thrown as well.
java.lang.NullPointerException - If the oParamTokenA or oParamTokenB argument was null.
See Also:
toSqlCode(java.lang.String, java.lang.String)

toSqlCode

public static int toSqlCode(java.lang.String oParamTokenA,
                            java.lang.String oParamTokenB)
                     throws java.lang.NumberFormatException,
                            java.lang.NullPointerException
Converts a given hexadecimal code found in the db2diag.log file into an SQL Message Code.

Remark: Please notice; the hexadecimal code could represent a DB2 Internal Return Code as well. For more information about how to interpret the db2diag.log, please have a look into the DB2 Documentation - Troubleshooting Guide.
Parameters:
oParamTokenA - The String holding the first (4 digits long) token.
oParamTokenB - The String holding the second (4 digits long) token.
Returns:
The calculated SQL Message Code.
Throws:
java.lang.NumberFormatException - For the case, that the given tokens has an invalid format or contains unexpected characters. If none of the tokens match FFFF_TOKEN, the exception is thrown as well.
java.lang.NullPointerException - If the oParamTokenA or oParamTokenB argument was null.
See Also:
toInternalReturnCode(java.lang.String, java.lang.String)

DbtuTools project
Java Library