diff --git a/config/modules/ffpdglr1.sql b/config/modules/ffpdglr1.sql index 9bf23ad..7641c7c 100644 --- a/config/modules/ffpdglr1.sql +++ b/config/modules/ffpdglr1.sql @@ -21,4 +21,17 @@ SELECT RSIZ AS rsiz FROM FANALDEV.FFPDGLR1 INNER JOIN LGDAT.RPRH ON NWBTID = BTID -WHERE DIGITS(NWFSYY)||DIGITS(NWFSPP) >= {ffpdglr1_wm} +WHERE DIGITS(NWFSYY)||DIGITS(NWFSPP) >= '{ffpdglr1_wm}' + -- Rollover hot set. The period floor above advances to the new period as soon + -- as one batch posts into it, so a late posting into the prior period would + -- stop being refreshed from that moment. These branches follow RPRH's own + -- stamps instead, and carry the unposted batches too (NWPDAT stays + -- 0001-01-01 until a batch posts, so no period/date floor can see them). + -- FFPDGLR1 itself has no dates -- only BTID/ENT#/SEQ# -- so RPRH is the only + -- change signal available. Measured 2026-08-19 mid-period: this adds 0 rows, + -- a strict subset of the period branch. It earns its keep at a period + -- boundary, which is the only time the two floors disagree. + OR NWPDAT >= DATE('{ffpdglr1_hot}') + OR NWUDAT >= DATE('{ffpdglr1_hot}') + OR NWCDAT >= DATE('{ffpdglr1_hot}') + OR RTRIM(NWPOST) <> 'Y'