public class EnterRequest extends API implements java.io.Serializable
isException()
is true
, in which
case a user trace entry is always written, even if the main and user trace
flags are off.
You can use the exception trace option in an application program to write a
trace entry when the program detects an exception or abnormal condition. To
do this, call setException(true)
before
calling enterTrace(byte[])
in your program's exception or abnormal
condition error-handling routine.
This provides the equivalent of the EXEC CICS ENTER TRACENUM
command.
Constructor and Description |
---|
EnterRequest() |
Modifier and Type | Method and Description |
---|---|
void |
enterTrace()
Writes a trace entry without data.
|
void |
enterTrace(byte[] data)
Writes a trace entry with data.
|
java.lang.String |
getResource() |
short |
getTraceIdentifier() |
boolean |
isException()
Gets whether CICS will write a user exception trace entry.
|
void |
setException(boolean traceException)
Specifies whether CICS is to write a user exception trace entry.
|
void |
setResource(java.lang.String resource)
Specifies an 8-character name to be entered into the resource field of the
trace table entry.
|
void |
setTraceIdentifier(short traceId)
Specifies the trace identifier for a user trace table entry with a value in
the range 0 through 199.
|
getCICSServerApiVersion
public EnterRequest()
public void enterTrace() throws InvalidRequestException, LengthErrorException
This is equivalent to enterTrace(null)
.
InvalidRequestException
- INVREQLengthErrorException
- LENGERRenterTrace(byte[])
public void enterTrace(byte[] data) throws InvalidRequestException, LengthErrorException
If data is not null
, the contents are to be entered into the
data field of the trace table entry.
data
- The trace data, with a maximum size of 4000 bytes. If data is
larger that 4000 bytes, a LengthErrorException
is
thrown.InvalidRequestException
- INVREQLengthErrorException
- LENGERRpublic java.lang.String getResource()
setResource(String)
public void setResource(java.lang.String resource)
The resource name must be 8 characters long. If the value supplied is too short then it is padded with spaces. If the value is too long then it is truncated.
If the resource is null
or blank (contains only space
characters) it will be omitted from the command.
resource
- The resource field of the trace table entry.public short getTraceIdentifier()
setTraceIdentifier(short)
public void setTraceIdentifier(short traceId)
traceId
- The trace identifier.public boolean isException()
true
if CICS will write a user exception trace entry.setException(boolean)
public void setException(boolean traceException)
true
, this option overrides the main user trace flag, and CICS
writes the trace entry even if the user trace flag is off.traceException
- true
if CICS is to write a user
exception trace entry.