Datamapper - Group Records Based on Field Content

I have fixed-width data and need to display a maximum of two (2) records when data in specific fields match. Otherwise, only a single record will be displayed. The field to match is contiguous. Below is the code used to sort this out in legacy PP7:

% &HoldName is a Global Variable that keeps track of the previous Name

if(ne(&HoldName,mid(&str,157,10)))
set(&HoldName,mid(&str,157,10))
if(ne(&current.line,0))
doform()
clearpage()
endif()
endif()
set(&current.line,&current.line + 1)
store(&current.line,&str)
if(ge(&current.line,&current.lpp))
doform()
clearpage()
endif()

Please find attached an example of fixed length group by field change.

FixedLengthExample.OL-datamapper (2.8 KB)

Good afternoon,

I get a message “Invalid Config File” when I try to open the file. Email was sent.

Which version of Connect are you using?