The user status update exit provides the ability to update a status.
The
Transaction Server calls the user exit while processing the extract. The
user exit implements the
com.ibm.icpcs.gatewayserver.user.UserStatusUpdateInterface interface.
Table 1 contains the interface methods.
Table 1. UserStatusUpdateInterface Methods
| Methods |
The Transaction Server calls this method... |
| setFileReceiptDate (String Date) |
To inform the user exit of the date the transmission
was received |
| setFileReceiptTime (String Time) |
To inform the user exit of the time the transmission
was received |
| setFileName (String Name) |
To inform the user exit of the original name
of the transmission being processed |
| setFileHdrRec (ICLFileRecord type01) |
When it encounters a file header record |
| setFileTrailerRec (ICLFileRecord type99) |
When it encounters a file header record, passing
the corresponding file trailer record |
| setCashLetterCalcAmt (long amount) |
To set the debit total amount in the batch (ICL) |
| setCashLetterCalcItemCnt (long count) |
To set the debit item count in the batch (ICL) |
| setCashLetterHdrRec (ICLCashLetterRecord type10) |
When it encounters a cash letter header record |
| setCashLetterTrailerRec (ICLCashLetterRecord
type90) |
When it encounters a cash letter header record,
passing the corresponding cash letter trailer record |
| setErrorText (String errorTxt) |
To give the user error information because of
an error condition |
| statusUpdate (int status) |
To inform the user of any status updates |
The main method implemented by the user is the
statusUpdate method.
This method is called with one of the status values as defined by
the STATUS_* constants. Before the
statusUpdate method
is called, the appropriate set methods are called on the user’s
object. It is the responsibility of the user to store this data into
its own object variables; therefore, when the
statusUpdate method
is called, the user has access to all the needed information. All
the status values are defined as follows:
Table 2. statusUpdate
method values
| Values |
Definition |
| STATUS_FILE_BEGIN |
Begin processing a transmission or batch (ICL) |
| STATUS_CL_BEGIN |
Begin processing a batch (ICL) |
| STATUS_CL_COMPLETE |
Finish processing a batch (ICL) |
| STATUS_FILE_COMPLETE |
Finish processing a transmission or batch (ICL) |
The
SimpleStatusUpdate class in the
samples directory
is an example of a user status update user exit. It logs the status
update in the
Transaction Server message log. You can invoke this by adding
the following to the parameters in your extraction profile:
<parameter name="userStatusUpdateClass">
com.ibm.icpcs.transactionserver.samples.cpcs.SimpleStatusUpdate
</parameter>