Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Combine columns without breaking words

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Sat Mar 19, 2016 9:33 am    Post subject: Combine columns without breaking words
Reply with quote

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
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1555
Location: Andromeda Galaxy

PostPosted: Sat Mar 19, 2016 3:17 pm    Post subject:
Reply with quote

It is better to handle this using COBOL rather than SYNCSORT
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 14 Fri Dec 01, 2017 10:29 pm
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us