User control record user exit

The user control record user exit must implement the com.ibm.icpcs.gatewayserver.user.UserControlRecordInterface Java™ interface. This interface has several getter and setter methods, along with the updateItemAddenda method. As a convenience, in addition to the interface, a class that implements all of the getter and setter methods is provided. The class, com.ibm.icpcs.gatewayserver.user.UserControlRecord, can be extended so the user only needs to implement the updateItemAddenda method.

When the Gateway Server processes a transmission, it calls different methods based on the record it is processing. The methods called are as follows:

For file header records (Type01):
  • setFileHdrRec()
  • setfileCtrRec()
For cash letter header records (Type10):
  • setCashLetterHdrRec()
  • setCashLetterCtrRec()
For bundle header records (Type 20):
  • setBundleHdrRec()
  • setBundleCtrRec()

updateItemAddenda method

The updateItemAddenda method is called for every item in the transmission (type 25, 31, and 61). Use this exit to add new, modify existing, or delete existing addendum records. All changes to the addendum records made in this exit are written to the Transaction Server and to the .TXS file. The method has the following parameters:
recordType
A string that contains the record type of the current record being processed.
records
A vector that contains the addendum records that are associated with the current item record.
isn
The item sequence number (ISN) that was assigned to this item by the originator.

Each addenda record is stored as an X9.37Record object in the vector of addenda records. The user may modify an addendum record from the transmission by getting the X9.37Record object from the vector and modifying it. Users can delete an addendum record by deleting it from the vector. Users can add an addenda record by creating an X9.37Record object and adding it to the vector.

The SampleUpdateItemAddenda class includes an updateItemAddenda method, which adds a type 28 record to the vector. This new record is written to the Transaction Server and the .TXS file.

The SampleUpdateItemAddenda.java file in the samples directory is an example of a user control record user exit.