In article <
[email protected]>,
Bruce Axtens <
[email protected]> wrote:
The statement
MOVE FUNCTION SUBSTITUTE(WS-PHRASE, "-", "") TO WS-PHRASE-TEMP.
during compile gives
warning: alphanumeric literal has zero length; a SPACE will be assumed
and thus dashes get replaced with spaces.
How do I *remove* dashes?
Pardon the hardcoded lengths.
01 FILLER.
05 WS-PHRASE PIC X(50) VALUE SPACES.
05 WS-PHRASE-TEMP PIC X(50) VALUE SPACES.
MOVE ZEROES TO SUB2.
PERFORM VARYING SUB1 FROM 1 BY 1 UNTIL SUB1 > 50
IF WS-PHRASE(SUB1:1) NOT = '-'
ADD 1 TO SUB2
MOVE WS-PHRASE(SUB1:1) TO WS-PHRASE-TEMP(SUB2:1)
END-IF
END-PERFORM.
... or something like that.
DD
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)