Cobol TRIM
Posted: Wed Dec 14, 2022 11:01 pm
Need some guidance regarding TRIM
I do understand
01 wa-area pic x(9).
move trim(' HELLO ',leading) to wa-area
when wa-area displayed it will be 'HELLO '
But what happens with TRAILING or BOTH
01 wa-area pic x(9).
move trim(' HELLO ',trailing) to wa-area
when wa-area displayed it will be ' HELLO '
The only solution I can find out is to use "INSPECT REVERSE" to count chars for leading space to find out how many chars that is significant
Any other solutions?
I do understand
01 wa-area pic x(9).
move trim(' HELLO ',leading) to wa-area
when wa-area displayed it will be 'HELLO '
But what happens with TRAILING or BOTH
01 wa-area pic x(9).
move trim(' HELLO ',trailing) to wa-area
when wa-area displayed it will be ' HELLO '
The only solution I can find out is to use "INSPECT REVERSE" to count chars for leading space to find out how many chars that is significant
Any other solutions?