How to remove trailing Spaces in Syncsort?



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Re: How to remove trailing Spaces in Syncsort?

Postby BillyBoyo » Wed Mar 07, 2012 12:52 am

How about just squeezing the first parsed field, ENDBEFR the "pipe"? The rest of the record can just be a normal definition, 11,70 for instance.

pjagathis, can you be very exact about your data, please. Can there be multiple blanks between elements of the first field, for instance?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to remove trailing Spaces in Syncsort?

Postby pjagathis » Wed Mar 07, 2012 2:38 pm

Yes BillyBoyo.

My field have multiple blanks between the fields and each blank will have length 1 byte only.
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to remove trailing Spaces in Syncsort?

Postby pjagathis » Thu Mar 08, 2012 12:30 pm

Hi mfrookie,

Above code replaces spaces in all fields. But i need to remove the spaces only in first field. In the above code if my input is as below then,

W 6 5 4   |Z|111| 
W9        | | 11| 
W96653400 | |11 | 
W966 34000| |1 1| 
W9665 44  | |   | 


Then the output will be,

---+----1----+---
*****************
W 6 5 4|Z|111|   
W9|| 11|         
W96653400||11|   
W966 34000||1 1|
W9665 44|||     


But the expected output will be as below,

----+----1----+----
*******************
W 6 5 4|Z|111|     
W9| | 11|         
W96653400| |11 |   
W966 34000| |1 1| 
W9665 44| |   |   



Please advice me..!

Thanks for your help..!
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: How to remove trailing Spaces in Syncsort?

Postby BillyBoyo » Thu Mar 08, 2012 9:33 pm

I don't have Syncsort, so I can't try this.

PARSE=(%00=(ENDAT=C'|',FIXLEN=11)),
...
BUILD=(%00,SQZ=(SHIFT=LEFT,MID=C' '),12,68)

If you try something like that, do you get something like what you want?

If your input is fixed-length and you get a problem with output being variable-length, try the affect of IFOUTLEN=n where n is your fixed-length.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Previous

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post