public interface IMSCallout
IMSCallout
interface is the starting point of a IMSCallout
(ICAL) DL/I request.
The following code shows an example of the implementation of this interface.
icalRequestArea = app.get31BitByteBuffer(100);
icalResponseArea = app.get31BitByteBuffer(100);
IMSCallout imsCallout = app.createImsCallout();
imsCallout.setOtmaDescriptor("SAMPLE")
.setRequestArea(icalRequestArea)
.setResponseArea(icalResponseArea)
.setSubFunction(IMSCallout.SubFunction.SENDRECV)
.setTimeout(10000)
.execute();
System.out.println(imsCallout.getReturnCode());
System.out.println(imsCallout.getReasonCode());
System.out.println(imsCallout.getErrorExtensionCode());
Application.createImsCallout()
Modifier and Type | Interface and Description |
---|---|
static class |
IMSCallout.SubFunction
SENDRECV
This is a The IMS application program uses this subfunction to send a message and wait for the response. |
Modifier and Type | Method and Description |
---|---|
IMSCallout |
execute()
Executes the IMSCallout (ICAL) DL/I request.
|
java.nio.ByteBuffer |
getControlDataArea()
Retrieves the static field for the control data area ByteBuffer
|
java.nio.charset.Charset |
getDefaultEncoding()
Retrieves the default encoding use by the IMSCallout interface
|
int |
getErrorCodeExtension()
Retrieves the static field AIB error code extension.
|
java.lang.String |
getMapName()
Retrieves the static field for the map name
|
java.lang.String |
getOtmaDescriptor()
Retrieves the static field for the OTMA Descriptor
|
int |
getOutputAreaLength()
Retrieves the static field AIB output area length populated by issuing an
execute and receiving partial data. |
int |
getOutputAreaUsed()
Retrieves the static field AIB output area used populated by issuing an
execute . |
int |
getReasonCode()
Retrieves the static field AIB reason code.
|
java.nio.ByteBuffer |
getRequestArea()
Retrieves the static field for the request area ByteBuffer
|
java.nio.ByteBuffer |
getResponseArea()
Retrieves the static field for the response area ByteBuffer
|
int |
getReturnCode()
Retrieves the static field AIB return code.
|
IMSCallout.SubFunction |
getSubFunction()
Retrieves the static field for the
SubFunction . |
int |
getTimeout()
Retrieves the static field for the timeout
|
IMSCallout |
setControlDataArea(java.nio.ByteBuffer controlDataArea)
Sets the control data area ByteBuffer to be used by
execute . |
IMSCallout |
setControlDataArea(java.nio.ByteBuffer controlDataArea,
int controlDataAreaSize)
Sets the control data area ByteBuffer to be used by
execute . |
IMSCallout |
setControlDataArea(java.lang.String controlDataArea)
Sets the control data area String to be used by
execute . |
IMSCallout |
setControlDataArea(java.lang.String controlDataArea,
java.nio.charset.Charset charset)
Sets the control data area as an encoded String to be used by
execute . |
IMSCallout |
setMapName(java.lang.String mapName)
Sets the map name in the AIB to be used by
execute . |
IMSCallout |
setOtmaDescriptor(java.lang.String otmaDescriptor)
Sets the OTMA descriptor name in the AIB to be use by
execute |
IMSCallout |
setRequestArea(java.nio.ByteBuffer requestArea)
Sets the request area ByteBuffer to be used by
execute . |
IMSCallout |
setRequestArea(java.nio.ByteBuffer requestArea,
int requestSize)
Sets the request area ByteBuffer to be used by
execute . |
IMSCallout |
setRequestArea(java.lang.String requestString)
Sets the request area String to be used by
execute . |
IMSCallout |
setRequestArea(java.lang.String requestString,
java.nio.charset.Charset charset)
Sets the request area as an encoded String to be used by
execute . |
IMSCallout |
setResponseArea(java.nio.ByteBuffer responseArea)
Sets the response area ByteBuffer to be used by
execute . |
IMSCallout |
setSubFunction(IMSCallout.SubFunction subFunction)
Sets the SubFunction code in the AIB to be used by
execute . |
IMSCallout |
setTimeout(int timeout)
Sets the timeout value, in hundredths of a second, into the AIB to be used by
execute |
IMSCallout setTimeout(int timeout) throws DLIException
execute
This is in direct correlation to the AIB field AIBRSFLD
The
valid range is 0 - 999999. The system default is 10 seconds.
This is an input parameter.
int
- DLIException
IMSCallout setOtmaDescriptor(java.lang.String otmaDescriptor) throws DLIException
execute
This is in direct correlation to the AIB field AIBRSNM1
This
8-byte, alphanumeric, left-aligned field must contain the name of the OTMA
descriptor that defines the destination of the IMS call.
This is an input parameter.
otmaDescriptor
- DLIException
IMSCallout setSubFunction(IMSCallout.SubFunction subFunction) throws DLIException
execute
. This
is in direct correlation to the AIB field AIBSFUNC
This is a
required static field in order to issue an ImsCallout request. The default is
SENDRECV
Valid SubFunctions are SENDRECV
and RECEIVE
This is an input parameter.
subFunction
- DLIException
IMSCallout setMapName(java.lang.String mapName) throws DLIException
execute
. This is in
direct correlation with AIB field AIBUTKN
Valid SubFunctions are SENDRECV
and RECEIVE
This is an optional input parameter.
mapName
- DLIException
IMSCallout setResponseArea(java.nio.ByteBuffer responseArea) throws DLIException
execute
.
ByteBuffer used can be either direct
or non-direct
.
This buffers capacity becomes the static field AIBOAUSE
This is an input parameter.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
responseArea
- DLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout setRequestArea(java.nio.ByteBuffer requestArea) throws DLIException
execute
.
ByteBuffer to be used can be either direct
or
non-direct
. This buffers capacity becomes the static field
AIBOALEN
This is an input parameter.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
requestArea
- DLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout setRequestArea(java.nio.ByteBuffer requestArea, int requestSize) throws DLIException
execute
.
ByteBuffer used can be either direct
or non-direct
.
requestSize specifies the actual amount of data set into the ByteBuffer with
the intent to efficiently manage storage. Becomes the value for the static
field AIBOALEN
This is an input parameter.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
requestArea,
- requestSizeDLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout setRequestArea(java.lang.String requestString) throws DLIException
execute
. This Strings
length becomes the static field AIBOALEN
This is an input parameter.
requestString
- DLIException
IMSCallout setRequestArea(java.lang.String requestString, java.nio.charset.Charset charset) throws DLIException
execute
. This Strings length becomes the static field
AIBOALEN
This is an input parameter.
requestString,
- charsetDLIException
IMSCallout setControlDataArea(java.lang.String controlDataArea) throws DLIException
execute
. This
Strings length becomes the static field AIBOPLEN
This is an optional input parameter for SENDRECV
.
String
- DLIException
IMSCallout setControlDataArea(java.lang.String controlDataArea, java.nio.charset.Charset charset) throws DLIException
execute
. This Strings length becomes the static field
AIBOPLEN
This is an optional input parameter for SENDRECV
.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
controlDataArea,
- charsetDLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout setControlDataArea(java.nio.ByteBuffer controlDataArea, int controlDataAreaSize) throws DLIException
execute
.
ByteBuffer used can be either direct
or non-direct
.
controlDataAreaSize specifies the actual amount of data set into the
ByteBuffer with the intent to efficiently manage storage. Becomes the value
for the static field AIBOPLEN
This is an optional input parameter for SENDRECV
.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
controlDataArea,
- controlDataAreaSizeDLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout setControlDataArea(java.nio.ByteBuffer controlDataArea) throws DLIException
execute
. ByteBuffer used can be either direct
or
non-direct
. This buffers capacity becomes the static field
AIBOPLEN
This is an optional input parameter for SENDRECV
.
Recommend allocating native ByteBuffer for improved storage efficiency.
Using non-direct ByteBuffers will cause execute
to check out
internally managed direct ByteBuffers, which will be copied to the original
set ByteBuffers after execute
If 31-bit native storage is required, Application class includes methods for allocating and freeing direct 31-bit ByteBuffers.
controlDataArea
- DLIException
Application#get31BitDirectByteBuffer(int)}
,
ByteBuffer.allocateDirect(int)
IMSCallout execute() throws DLIException
DLIException
int getReturnCode() throws DLIException
AIBRETRN
This is an output parameter.
int
DLIException
int getReasonCode() throws DLIException
AIBREASN
This is an output parameter.
int
DLIException
int getErrorCodeExtension() throws DLIException
This is an output parameter.
int
DLIException
int getOutputAreaUsed() throws DLIException
execute
. This is in direct correlation with AIB field
AIBOAUSE
. This field is only retrievable after making a
IMSCallout request
This is an output parameter.
int
DLIException
int getOutputAreaLength() throws DLIException
execute
and receiving partial data. This is in direct
correlation with AIB field AIBOALEN
. This field is only
retrievable after making a IMSCallout request
This is an output parameter.
int
DLIException
java.nio.ByteBuffer getResponseArea()
ByteBuffer
java.nio.ByteBuffer getRequestArea()
ByteBuffer
java.nio.ByteBuffer getControlDataArea()
ByteBuffer
java.lang.String getOtmaDescriptor()
int getTimeout()
java.lang.String getMapName()
java.nio.charset.Charset getDefaultEncoding()
Charset
IMSCallout.SubFunction getSubFunction()
SubFunction
.SubFunction