From 51ee71638f9ab530d249aee7aaf19783f2649573 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 18 Aug 2026 23:48:22 -0400 Subject: [PATCH] Add a rollover hot set to ffpdglr1 The fiscal-period floor advances to the new period as soon as one batch posts into it, so a late posting into the prior period stopped being refreshed from that moment. FFPDGLR1 itself has no dates -- only BTID/ENT#/SEQ# -- so RPRH is the only change signal available: the new branches follow its NWPDAT/NWUDAT/NWCDAT stamps against a 14-day floor, and carry the unposted batches too. Strictly additive. Measured mid-period the hot set is a subset of the period branch, adding 0 rows -- the run stays at 132,325 rows. It earns its keep at a period boundary, the only time the two floors disagree. Co-Authored-By: Claude Opus 5 --- config/modules/ffpdglr1.sql | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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'