Hi All
I have a huge file with multiple header and trailer. I have another file with only header values.
Now the huge file has to be splitted into two files - one if the header matches and other when the header not matching.
Example given below.
Input File1
HDR AAAA
1232
12455
2XDW2
TRL
HDR BBBB
12321
SER2
242
ASDFA
TRL
HDR CCCC
KDOAE
122
TRL
HDR DDDD
KLIYU
WER3
4368
TRL
INPUT FILE2
AAAA
DDDD
EXPECTED OUTPUTS
OUTPUT1
HDR AAAA
1232
12455
2XDW2
TRL
HDR DDDD
KLIYU
WER3
4368
TRL
OUTPUT2
HDR BBBB
12321
SER2
242
ASDFA
TRL
HDR CCCC
KDOAE
122
TRL
Please advise in acheiving this