Generate Batch ID for Single Event Swap Trades Processing Notes
Background
When multi-leg swap trades are entered using a message/loader, the trade’s Batch Identifier (701) is always inherited from its Trade Ticket Number (761). The same applies even if a different batch Identifier is instructed. This logic exists because subsequent transaction processing in Eagle (cancels and IDLOT closes, for example) relies on Batch Identifier. Since the source system needs to be able to target a specific trade based on its Batch Identifier, the expectation is that it is generating its own Trade Ticket Numbers and does not have a separate concept of Batch Identifier.
Exceptions
In cases where the source system is unable to reliably generate Trade Ticket Numbers with the necessary level of uniqueness, a local solution can be implemented to have Eagle always generate a unique Batch Identifier. We do not recommend implementing this solution in other cases.
Once this solution has been implemented, IDLOT closes must be booked with Target Trade Ticket Number (762) equal to the Batch Identifier from the open lot (instead of Trade Ticket Number). Since Eagle will be generating the Batch Identifier, a feedback loop to the source system must exist so it knows the Batch Identifier that Eagle generated for each trade.
Solution
The solution involves Auto Includes and Overlays to ensure the same logic applied for CSV message/loader and manual trades. The logic is not applied for EagleML (EML) trades.
Auto Include
Add the line below to an Auto Include After for csv-buy.xml and csv-sell.xml.
<COL TAG="701" EXPRESSION="Iif(:is_swap: = 'Y' AND :tag17940: = 'Y', GUID(), :tag701:)" />Overlay
Comment out the line below from all applicable Single Event trade panels:
pan-trswapopen_singleleg.htm
pan-trswapclose_singleleg.htm
pan-irswapopen_singleleg.htm
pan-irswapclose_singleleg.htm
pan-crswapopen_singleleg.htm (available starting in V17 R2.49 and R2.46 CST03)
pan-crswapclose_singleleg.htm (available starting in V17 R2.49 and R2.46 CST03)
701i !text IF :9153: != "MC_MODE" AND :761: != "" THEN ASSIGN(@:701:,:761: );