Skip to Content
0
Former Member
Apr 29, 2009 at 08:07 PM

Issue getting TRANSLATE statement working....

15 Views

Hello,

I am having trouble understanding translate statement.

DATA: LETTERS(4) VALUE 'YaaX',

CHANGE(4) VALUE 'aXba'.

TRANSLATE LETTERS USING CHANGE.

WRITE: LETTERS.

The output is 'YXXX'. But I am not sure why this is.

I thought that every letter that exists in another letter gets replaced by the letter that follows it and if does not exit then it remains unchanged. So b does exist after X but still the output shows X at end and not b as below.

So the output should be 'YXXb'.

Please help

Regards,

Jainam.

Edited by: Jainam Shah on Apr 29, 2009 10:08 PM