You are responsible for the synchronization of recovery and duplicate protection logic in your NOF programs.
Duplicate Transactions
You can test for duplicate transactions sent to the NOF program from your application.
On receipt of a message from the application, store the GL-MSG-UNIQUE value for each station, (possibly in the station table). If the value of GL-MSG-UNIQUE is the same as the previous GL-MSG-UNIQUE value for that station, the message is a duplicate transaction. You must also consider AUTO-CNT, since a transaction might perform more than one Automatic Entry.
In addition, your external stations should not send further input until they have received a successful response to their previous input.
Recovery
If synchronized recovery is required, you must provide logic in your NOF program to perform the following:
Generate unique serial numbers.
Assign a serial number to each NOF input message.
Maintain a table in your NOF program, containing the following details:
station id indicator message
These parameters are detailed in the following table.
Parameter | Description |
---|---|
station | Station sending the message |
id | Unique number generated and assigned to each input message by your NOF program |
indicator | Indication that the input has received a successful reply from the application, or is waiting for a response. |
message | Message text string |
You can manage the size of the table in your NOF program by creating a Memo Ispec in your application to retain details of transactions processed by station name, in the following form:
stationid
After the recovery process, your NOF program should perform the following:
Interrogate the Memo Ispec to identify the last transaction successfully processed for each station. Identify the last serial number processed.
Read the table maintained by the NOF program and resubmit each transaction, commencing after the last valid serial number.