Incoming File Update Process

The Gateway retrieves data from the incoming updating file to update the transaction and batch (ICL) data in the Transaction Server database tables.

A user updating file reader should be created to retrieve the data from the update file. The user updating file reader must extend com.ibm.icpcs.gatewayserver.user.filereader.UserUpdateFileReaderImpl Java™ class. This abstract class has several abstract methods that must be implemented:
public boolean totalRecords(FileReaderContextInterface aFileReaderContextInterface) throws FileReaderException
Read all records from the file, calculate the totals in the file and update aFileReaderContextInterface totals.
public void readRecords(UpdateFileReaderCallbackInterface callback) throws FileReaderException
Read all records from the file and update batches (ICLs) and transactions
public void close( )
Close the file
public String getFormat( )
Return the file format
public boolean isEBCDICFile( )
Return if the file is an EBCDIC file
public FileTypeId getFileTypeId( ) throws FileReaderException
Returns the transmission type ID
public void setFileTypeId(FileTypeId aFileTypeId)
Set the transmission type ID

To update a batch (ICL), call the updatePresentment(UserPresentmentUpdateBean presentmentUpdateBean) method in UpdateFileReaderCallbackInterface. A batch (ICL) ID must be provided to locate the batch (ICL). All fields in the UserPresentmentUpdateBean, including all user data fields, are permitted to be updated. The name of the user data must match the columns in the presentment user table in the FTM database.

To update a transaction, call the updatePayment(UserPaymentUpdateBean paymentUpdateBean) method in UpdateFileReaderCallbackInterface. The transaction ID or business date, category, and item sequence number must be provided to locate the transaction. All fields in the UserPaymentUpdateBean, including all user data fields, are permitted to be updated. The name of the user data must match the columns in the payment user table in the FTM database.

A sample, SampleUpdateFileReader, is provided that gives information about how to read records from the updating file and call methods to update batches (ICLs) and transactions. All user created updating file reader classes must be included in the Gateway Server running the classpath.

To find the user updating file reader, a new record must be added to the file suffix table that specify the columns:
  • FILE_EXT, which updates file extensions without using a period (.)
  • FILE_READER_CLASS, which creates the new updating file reader full class name. It must be the full class name of the user created file reader, except IBM® default classes.
For example:
FILE_EXT = ABC
FILE_READER_CLASS = com.ibm.icpcs.gatewayserver.sample.ABCUpdateFileReader

When a file ending with .ABC is dropped to the Gateway Server source folder, the Gateway Server loads ABCUpdateFileReader, according to the file extension, and uses the updating file reader to update batches (ICLs) and transactions.