View previous topic :: View next topic
|
Author |
Message |
satyasivaji_82
New User
Joined: 17 Mar 2007 Posts: 1 Location: Hyderabad
|
|
|
|
I HAVE A FOLLOWING STRING 'ABC DEF GHI'. AND I WANT TO DISPLAY LIKE
'ABCDEFGHI' WITH OUT SPACES USING INSPECT VERB.HOW TO DO THIS,CAN ANY ONE SUGGEST ME. |
|
Back to top |
|
|
ashwinreddy
Active User
Joined: 16 Sep 2004 Posts: 106 Location: Hyderabad
|
|
|
|
Hi,
Its too complicated process if using the INSPECT verb.I think we can better go following logic using unstring and string
UNSTRING WS-MISC
DELIMITED BY ALL SPACES
INTO WS-WORD1 WS-WORD2 WS-WORD3
WS-WORD4 WS-WORD5 WS-WORD6
END-UNSTRING
STRING WS-WORD1 WS-WORD2 WS-WORD3
WS-WORD4 WS-WORD5 WS-WORD6
DELIMITED BY SPACES
INTO WS-MISC2
END-STRING
DISPLAY 'MISC2 ===>' WS-MISC2
Hope this will help you.
Cheers
Ashwin |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
satyasivaji_82 wrote: |
I HAVE A FOLLOWING STRING 'ABC DEF GHI'. AND I WANT TO DISPLAY LIKE
'ABCDEFGHI' WITH OUT SPACES USING INSPECT VERB.HOW TO DO THIS,CAN ANY ONE SUGGEST ME. |
The inspect verb can not do what you want, the string/unstring or just reference modification and a perform loop.
Please learn what the Caps Lock key is and how to use it. |
|
Back to top |
|
|
Sourav Banerjee
New User
Joined: 17 May 2007 Posts: 1 Location: kolkata
|
|
|
|
Can you try out with - Inspect 'string' replacing all SPACES BY '' |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums
INSPECT will change a value to another - it does not remove them - it is not an editor.
Please look at the post before yours.
Before posting a suggestion (especially ont that that has already been advised against), you might try it on your system to make sure it works. |
|
Back to top |
|
|
|