Page 1 of 1

Replace Two Qutoes by One Quote

PostPosted: Tue Jan 19, 2021 5:46 pm
by knobi
Good morning, I've DFSort job doing many things, and so far it's running without problems.
Now data format has changed and we start receiving lines with consecutive quotes.
How could I replace two consecutive quotes by One quote ?


Input :
123456789012345678901234567890123456789012345678901234567890
' ajskdjaskj '    '    aksjdkasjdkjdk'
 



Output :
' ajskdjaskj '    aksjdkasjdkjdk'


Quote's position doesn't really matter. Only one is gone.
I'm trying with this but with no success :
   INREC IFTHEN=(WHEN=INIT,FINDREP=(IN=c' ' '', OUT=c' ' '))




Any help is welcome ! Thanks

Re: Replace Two Qutoes by One Quote

PostPosted: Tue Jan 19, 2021 9:37 pm
by sergeyken
The syntax of your FINDREP is wrong.
This job cannot run at all; RC=8, or 12 is expected

Please, present your code which can run without SORT errors

P.S.
It is not clear from your example, what is the expected “correct” output?
There are no “double quotes” at all...