how to removes spaces in file using sorT?

SyncSort's Sort Product, SyncTool for z/OS, SYNCINIT and SYNCLIST.
Post Reply
Neeraj Mehta
Registered Member
Posts: 16
Joined: Sat Oct 04, 2014 9:36 am
India

how to removes spaces in file using sorT?

Post by Neeraj Mehta »

Hi Everyone,

Does anyone know how to removes spaces in file using sort.

I have a file which record length is 2000. I need to trim all the areas which has spaces in the file. For example, if I have data like 'XXXXX   111 YYY' then output should be 'XXXXX111YYY'.

The only thing is we don't know at which position we might have spaces
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: how to removes spaces in file using sorT?

Post by Anuj Dhawan »

Try, untested:

Code: Select all

SORT FIELDS=COPY
INREC BUILD=(1,80,SQZ=(SHIFT=LEFT))
 
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Post by enrico-sorichetti »

sorry ...
while the answer might be - at the lowest level of technicalities - correct
it was rushed ...
we do not know anything about the TS environment and the cconsequence of an unconditional shift of all the data

wiser for the ts to repost/clarfify  the question with a few more details ...
for example is the dataset FB vs. VB  ( record length is 2000 )


 
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: how to removes spaces in file using sorT?

Post by Anuj Dhawan »

Agree, it was rushed.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Neeraj Mehta
Registered Member
Posts: 16
Joined: Sat Oct 04, 2014 9:36 am
India

Re: how to removes spaces in file using sorT?

Post by Neeraj Mehta »

Thanks, this has worked for me.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SyncSort, SyncTool, SyncGener.”