Hi,
I'm having trouble joining several lines into one record. When MSIN is found then join the second
field of the first 3 lines and first field of the succeeding lines until MSIN found. Having the following input file format :
MSIN: 7100000000
NDC: 721
TELEPHON 247307
TS21 247307
TS22 247307
BS26 247307
MSIN: 7100000001
NDC: 721
TELEPHON 336771
TS21 336771
TS22 336771
MSIN: 7100000005
NDC: 721
TELEPHON 244825
TS21 244825
TS22 244825
MSIN: 7100000006
NDC: 721
TELEPHON 242664 TS11
BS26 506046 U26T8N1I
TS21
TS22
******* OUTPUT *****************************
7100000000 721 247307 TS21 TS22 BS26
7100000001 721 336771 TS21 TS22
7100000005 721 336771 TS21 TS22
7100000006 721 242664 BS26 TS21 TS22
*****************************************
Thanks
I'm having trouble joining several lines into one record. When MSIN is found then join the second
field of the first 3 lines and first field of the succeeding lines until MSIN found. Having the following input file format :
MSIN: 7100000000
NDC: 721
TELEPHON 247307
TS21 247307
TS22 247307
BS26 247307
MSIN: 7100000001
NDC: 721
TELEPHON 336771
TS21 336771
TS22 336771
MSIN: 7100000005
NDC: 721
TELEPHON 244825
TS21 244825
TS22 244825
MSIN: 7100000006
NDC: 721
TELEPHON 242664 TS11
BS26 506046 U26T8N1I
TS21
TS22
******* OUTPUT *****************************
7100000000 721 247307 TS21 TS22 BS26
7100000001 721 336771 TS21 TS22
7100000005 721 336771 TS21 TS22
7100000006 721 242664 BS26 TS21 TS22
*****************************************
Thanks