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
how to removes spaces in file using sorT?
-
- Registered Member
- Posts: 16
- Joined: Sat Oct 04, 2014 9:36 am
- Anuj Dhawan
- Founder
- Posts: 2812
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: how to removes spaces in file using sorT?
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.
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.
-
- Global Moderator
- Posts: 836
- Joined: Wed Sep 11, 2013 3:57 pm
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 )
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
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
- Anuj Dhawan
- Founder
- Posts: 2812
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: how to removes spaces in file using sorT?
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.
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.
-
- Registered Member
- Posts: 16
- Joined: Sat Oct 04, 2014 9:36 am
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