The IMS Java Dependent Regions (JDR) Resource Adapter supports a simple way to specify the layout of input and output messages by a Java metadata class. Defining such a layout enables a Java transaction program to easily
- get values from specific fields within an input message in the corresponding Java datatype and
- set values into specific fields within an output message from the corresponding Java datatype.
For instance: A Java transaction progam should implement functionality for doing a deposit. The input message will contain some information stored on the cash or credit card used at the ATM like the card and / or account number as well as the deposit amount and maybe some additional information like the ATM number. An IMS JDR Resource Adapter message metadata class for this would look something like the following one:
package xyz;
import com.ibm.ims.base.DLITypeInfo;
import com.ibm.ims.application.IMSFieldMessage;
public class DepositInputMessage extends IMSFieldMessage {
private static final long serialVersionUID = 1L;
private static final DLITypeInfo[] messageFieldsMetadata = {
new DLITypeInfo("ACCOUNTNUMBER", DLITypeInfo.BIGINT, 1, 8),
new DLITypeInfo("CARDNUMBER", DLITypeInfo.BIGINT, 9, 8),
new DLITypeInfo("AMOUNT", "S999999999999V99", DLITypeInfo.PACKEDDECIMAL, 17, 8),
new DLITypeInfo("ADDITIONALINFORMATION", DLITypeInfo.CHAR, 25, 150)
};
public DepositInputMessage() {
super(messageFieldsMetadata, 174, false);
}
}
In this case account and card number are stored binary in 8 byte long message fields. The corresponding SQL datatype is BIGINT, the corresponding Java datatype is Long. The deposit amount is stored as signed packed decimal in an 8 byte long message field. The corresponding SQL datatype is DECIMAL, the corresponding Java datatype is BigDecimal. Additional information are stored in an 150 byte long character message field. The corresponding SQL datatype is CHAR, the corresponding Java datatype is String.
With this definitions you are able to easily get the values from your input message by the methods
- inputMessage.getLong("ACCOUNTNUMBER"),
- inputMessage.getLong("CARDNUMBER"),
- inputMessage.getBigDecimal("AMOUNT") and
- inputMessage.getString("ADDITIONALINFORMATION").
In the same way you are able to use some set-methods to easily set message field values into your output message.
If you want to call this transaction from a Java application server component like a Java Servlet or an Enterprise Java Bean (EJB) or from a simple Java application you have to use either IMS Enterprise Suite Connect API or IMS TM Resource Adapter. For both it is desirable to have the same functionality, such that you are able to easily set values into your input message for the transaction you want to call respectively get values from the output message the transaction you have called sends back. The application server or client side API should be able to use the same message metadata classes like the IMS JDR Resource Adapter, because the message layouts are the same. Actually in IMS Enterprise Suite Connect API it is not possible to provide such a layout definition. Because of this it is only possible to set respectively to get the whole message segment as a Java byte array or a Java String. You have to implement your own methods to set your data into your transaction's input message or to get your data out of your transaction's output message. So there are probably many implementations out there doing the same things. Because of that the API should provide this functionality.
Thank you for your interest in keeping IMS a vital and successful product. Software development has continuously evolved during IMS's lifetime, and so has IMS itself. We have kept pace with, adopted, and implemented many industry standard best practices within our organization, including Continuous Delivery, Design Thinking, and Agile.
At this time, after further review this request for enhancement, we have decided to reject it. The reason we are rejecting RFE ID 73612 is because given our current priorities we cannot in good faith get to this within 18 months from the date that it is being opened. We value the requested requirement and we will keep consider if there are more customer interest and priority changed. You are also welcome to resubmit this RFE at a later date and we will reconsider.
If you have any further question, please contact us.
Thank you!
Haley Fung - hfung@us.ibm.com
Due to processing by IBM, this request was reassigned to have the following updated attributes:
Brand - Information management
Product family - IMS
Product - IMS Enterprise Suite
Component - General ES
Operating system - IBM z/OS
Source - None
For recording keeping, the previous attributes were:
Brand - Servers and Systems Software
Product family - zBLC family
Product - zBLC
Component - zBLC Requirements
Operating system - IBM z/OS
Source - zBLC