Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: Removing Extra Spaces in a comma separated file

$
0
0
Author: Puspojit
Subject: Removing Extra Spaces in a comma separated file
Posted: Tue Sep 13, 2016 7:46 am (GMT 5.5)

I have a file as below
Code:

DON BRADMAN          ,AUSTRALIA        ,101,CAPTAIN   AUS
SACHIN  TENDULKAR    ,INDIA            ,99 ,CAPTAIN   IND


Need to convert the file to below format and send across to users
Code:

DON BRADMAN,AUSTRALIA,101,CAPTAIN   AUS
SACHIN  TENDULKAR,INDIA,99,CAPTAIN   IND


I used FINDREP and changed x'4040' To x'' which solved the problem to an extent (and then changing single space and comma to just a comma). However whenever there are two spaces within a column, like in example above(CAPTAIN AUS), the logic breaks.

Is there any way we can achieve this through SORT ?

Please advise.
[/quote]


Viewing all articles
Browse latest Browse all 8500

Trending Articles