Except that CONVERT will take a from list and a to list. Much as Wil
winds me up,he is spot on here.

I often use that trick when validating input - if say I only want
numbers I will do something like

INPUT INPUTVAR
JUNK = CONVERT( "01234567890", "", INPUTVAR)
CONVERT JUNK TO "" IN INPUTVAR

It relies on CONVERT replacing the xth from-char with the xth to-char,
and if the to-string is null it effectively deletes all characters in
the list.

Cheers,
Wol

On 26/04/12 01:07, Tony Gravagno wrote:
> I don't recall about which platforms this applies, but CONVERT is used
> to change a single character. CHANGE or SWAP (depending on platform)
> changes multiple chars:
> 
> CONVERT SINGLE1 TO SINGLE2 IN VAR
> VAR = CHANGE(VAR,MULTI1,MULTI2)
> VAR = SWAP(VAR,MULTI1,MULTI2)
> 
> 
>> From: Wjhonson 
>> Doesn't
>>     CONVERT CHAR(10):CHAR(13) TO "" IN X.ID work?
> 
> 
>> From: Greg Coelho
>> Any suggestions how I can use CONVERT to strip ASCII control
>> characters EC 010 and 013 (LFCR) from a variable?
>> CONVERT '?' TO '' IN X.ID
> 
> 
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> 

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to