March 02, 2012, 03:20 PM
Kamesh[SOLVED]STRIP not working properly
Hi,
I have the following string and try to remove the '.' from it. I am using STRIP but not returning me the correct string.
Below is the code I am using.
-SET &DISTNAME=STRIP(32,'Aishwarya Consolidates Pvt. Ltd.','.','A32');
-TYPE DISTNAME &DISNAME
-EXIT
This is the output I am getting
-TYPE DISTNAME Aishwarya Consoli
DISTNAME Aishwarya Consoli
-EXIT
what am I missing here?
This message has been edited. Last edited by: Kamesh, March 02, 2012, 03:44 PM
njsdenquote:
-SET &DISTNAME=STRIP(32,'Aishwarya Consolidates Pvt. Ltd.','.','A32');
-TYPE DISTNAME &DISNAME &DISTNAME
-EXIT
Works for me when using the right variable.
DISTNAME Aishwarya Consolidates Pvt Ltd
March 02, 2012, 03:52 PM
KameshThat was the typo.
Anyway the issue was with the length field. I had that as &DLEN. Once I change that to use EVAL, it started working.
-SET &DISTNAME=STRIP(&DLEN.EVAL,'Aishwarya Consolidates Pvt. Ltd.','.','A&DLEN.EVAL');
Thanks