View previous topic :: View next topic
|
Author |
Message |
Indrajit_57 Warnings : 1 New User
Joined: 27 Jun 2006 Posts: 60
|
|
|
|
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.
For eg.
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.
Thanks
Indrajit |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
It is better to handle this using COBOL rather than SYNCSORT |
|
Back to top |
|
|
|