Open PORCPI and find RCPHSEQ where day-end is falling over (should be first line in this table)
Open POLINEZ and find last RCPLSEQ number
Open PORCPM and PORCPL and find the transaction where day-end is falling over by using the RCPHSEQ number.
Compare the last RCPLSEQ in POLINEZ with the sequence number in PORCPM and PORCPL. If the RCPLSEQ in PORCPM and PORCPL is smaller
than the sequence numbers in POLINEZ that must then be corrected.
Add any number (I used 3) to the RCPLSEQ in PORCPM and PORCPL and replace the two fields in PORCPM and PORCPL with the new value.
Run day-end to test.