My input file is :
*********************************************************** Top of Data **********************************************************
178 A&B BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
0A8 C 00000000000001000325 120 2016-03-01 999 REJECT - INVALID BANK NUMBER
122 C 00000000000000900051 120 2016-03-01 999 REJECT - BANK NUMBER NOT ON BANK CONTROL
078 GREAT LAKES NATIONAL BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
078 C 00000000000000025526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
078 C 00000000000000900051 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
174 BADGER STATE SAVINGS XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
174 C 00000000000000031997 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 A&B BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
178 C 00000000000000045526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 C 00000000000001000326 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
********************************************************** Bottom of Data ********************************************************
I want to eliminate the duplicate header and have the detail records under one header like this:
*********************************************************** Top of Data **********************************************************
078 GREAT LAKES NATIONAL BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
078 C 00000000000000025526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
078 C 00000000000000900051 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
174 BADGER STATE SAVINGS XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
174 C 00000000000000031997 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 A&B BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
0A8 C 00000000000001000325 120 2016-03-01 999 REJECT - INVALID BANK NUMBER
122 C 00000000000000900051 120 2016-03-01 999 REJECT - BANK NUMBER NOT ON BANK CONTROL
178 C 00000000000000045526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 C 00000000000001000326 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
********************************************************** Bottom of Data ********************************************************
078 GREAT LAKES NATIONAL BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
078 C 00000000000000025526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
078 C 00000000000000900051 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
174 BADGER STATE SAVINGS XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
174 C 00000000000000031997 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 A&B BANK XAA INTERFACE GENERAL ERROR REPORT R-10500 SET-001 05-23-16 PAGE:
REC SVC
BANK ACCOUNT NUMBER TYPE EFF DATE SRC CODE ERROR MESSAGE
0A8 C 00000000000001000325 120 2016-03-01 999 REJECT - INVALID BANK NUMBER
122 C 00000000000000900051 120 2016-03-01 999 REJECT - BANK NUMBER NOT ON BANK CONTROL
178 C 00000000000000045526 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
178 C 00000000000001000326 120 2016-03-01 999 REJECT - INVALID SERVICE CODE
120 2016-03-01 999 REJECT - INVALID SERVICE CODE
********************************************************** Bottom of Data ********************************************************
Can someone please help me?
Coded