Getting Started with Processed Transaction Data Interface
Overview
The Processed Transaction Data Interface is a crucial component of the CICS Bank Sample Application (CBSA). It is designed to handle the data related to processed transactions within the banking application. This interface is implemented using the Proctran class, which represents the structure and data of processed transactions.
Proctran Class
The Proctran class is generated by the IBM Record Generator for Java and includes various fields and constants that define the structure of a processed transaction. It includes fields for transaction details such as sort code, transaction number, date, time, reference, type, and description. This class is used across multiple components of the application, including COBOL programs and Java classes, to handle transaction data.
The Proctran class is defined in the src/webui/src/main/java/com/ibm/cics/cip/bankliberty/datainterfaces/PROCTRAN.java file. It initializes a CobolDatatypeFactory
public class PROCTRAN {
protected static CobolDatatypeFactory factory = new CobolDatatypeFactory();
static { factory.setStringTrimDefault(false); }
Usage in Java
In Java, the Proctran class is used in the ProcessedTransactionResource and ProcessedTransaction classes to manage and query transaction data.
Usage in COBOL
In COBOL, the Proctran class is used in various programs like DELACCXFRFUN, CRECUST, CREACCDELCUSDBCRFUN to interact with the transaction data stored in the DB2
The DELACCPROCDB2Proctran to interact with the DB2
* PROCTRAN DB2 copybook
EXEC SQL
INCLUDE PROCDB2
END-EXEC.
* PROCTRAN host variables for DB2
01 HOST-PROCTRAN-ROW.
03 HV-PROCTRAN-EYECATCHER PIC X(4).
03 HV-PROCTRAN-SORT-CODE PIC X(6).
03 HV-PROCTRAN-ACC-NUMBER PIC X(8).
Main Functions
The Proctran class includes several main functions to handle transaction data. Two important functions are getProcTranTypeisProcTyChequeAcknowledged
getProcTranType
getProcTranTypeThe getProcTranType
The getProcTranTypeprocTranType
public String getProcTranType() {
if (procTranType == null) {
procTranType = PROC_TRAN_TYPE.getString(byteBuffer);
}
return procTranType;
}
isProcTyChequeAcknowledged
isProcTyChequeAcknowledgedThe isProcTyChequeAcknowledgedgetProcTranTypePROC_TY_CHEQUE_ACKNOWLEDGED
The isProcTyChequeAcknowledged
public boolean isProcTyChequeAcknowledged() {
return getProcTranType().equals(PROC_TY_CHEQUE_ACKNOWLEDGED);
}
This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human