View previous topic :: View next topic
|
Author |
Message |
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
I am having an Alphanumric field (A50).I need to remove the spaces from the present in that.
I used compress leaving no spaces but it is not working.
Code: |
DEFINE DATA
LOCAL
1 #I (A25)
END-DEFINE
INPUT #I
COMPRESS #I INTO #I LEAVING NO SPACE
DISPLAY #I
END
RESULT
#I abcd efg hij klmnio pqr
#I
-------------------------
ABCD EFG HIJ KLMNIO PQR
|
Am i missing something,any other workaround to achieve the same ?? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Can you display #I in a hex format to insure that the apparent 'spaces' are really x'40's? |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi beruoist,
If you want to remove the trailing spaces from the string then try the EXAMINE FULL with delete option.
e.g. EXAMINE FULL #string ' ' DELETE
beruoist wrote: |
I am having an Alphanumric field (A50).I need to remove the spaces from the present in that.
I used compress leaving no spaces but it is not working.
Code: |
DEFINE DATA
LOCAL
1 #I (A25)
END-DEFINE
INPUT #I
COMPRESS #I INTO #I LEAVING NO SPACE
DISPLAY #I
END
RESULT
#I abcd efg hij klmnio pqr
#I
-------------------------
ABCD EFG HIJ KLMNIO PQR
|
Am i missing something,any other workaround to achieve the same ?? |
|
|
Back to top |
|
|
|