Splitting a Record based on a Pattern
Posted: Wed Apr 03, 2013 10:46 am
Hi,
We have a requirement for reading stelink messages as below.
:20:ABCD122
:21:BCD3455
:32B:USD10000,00
:52B:1323467
ABC BANK
ABC OPERATIONS
NO:78, NEW TOWN
ATLANTA, NEW MEXICO 30265
:53D:1323467
BCD BANKS
BCD OPERATIONS
NO:92 FIRST SQUARE
INIDA
:50A:9612485
KJDKNUIOPA
This input record will have to be split based on the :XXX: tags. We did manage to split using Index and Field function for single line tags. Multiline tags were also split by using : as the next delimiter while capturing the record.
But now we are receiving colon ( : ) as part of the content itself. Hence breaking the code which we wrote.
Can somebody suggest me any ways to split the above mentioned record into mutiple columns based on the tag values?
Thanks,
Kalai Selvan
We have a requirement for reading stelink messages as below.
:20:ABCD122
:21:BCD3455
:32B:USD10000,00
:52B:1323467
ABC BANK
ABC OPERATIONS
NO:78, NEW TOWN
ATLANTA, NEW MEXICO 30265
:53D:1323467
BCD BANKS
BCD OPERATIONS
NO:92 FIRST SQUARE
INIDA
:50A:9612485
KJDKNUIOPA
This input record will have to be split based on the :XXX: tags. We did manage to split using Index and Field function for single line tags. Multiline tags were also split by using : as the next delimiter while capturing the record.
But now we are receiving colon ( : ) as part of the content itself. Hence breaking the code which we wrote.
Can somebody suggest me any ways to split the above mentioned record into mutiple columns based on the tag values?
Thanks,
Kalai Selvan