Warnings : 1
Joined: 27 Jun 2006
|I have flat file of 500 bytes fixed length. This file contains 5 address lines each of 60 bytes.
My requirement is to combine the address lines by removing unwanted spaces so that the address appears continously as much as possible. The basic intention is to fit in as many characters as possible in each address line (60 byte maximum). The catch is however there should not be any words which should break.
Address line 1 - Lane number 56
Address line 2 - Villa number 12345
Address line 3 - Florida United States of America
Output should be
Address line 1 - Lane number 56 Villa number 12345 Florida United States of
Address line 2 - America
Address line 3 - This line should be blanked out
I have used the SQZ operator with MID option but I am not sure how to handle the part of not breaking the word.