Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removing SPACES from a string using INSPECT verb

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics
View previous topic :: :: View next topic  
Author Message
satyasivaji_82

New User


Joined: 17 Mar 2007
Posts: 1
Location: Hyderabad

PostPosted: Fri Apr 27, 2007 12:37 pm    Post subject: Removing SPACES from a string using INSPECT verb
Reply with quote

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
View user's profile Send private message

ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Fri Apr 27, 2007 2:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 27, 2007 3:38 pm    Post subject: Re: HOW TO DISPLAY THE OUTPUT USING INSPECT VERB
Reply with quote

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
View user's profile Send private message
Sourav Banerjee

New User


Joined: 17 May 2007
Posts: 1
Location: kolkata

PostPosted: Thu May 31, 2007 4:17 pm    Post subject:
Reply with quote

Can you try out with - Inspect 'string' replacing all SPACES BY ''
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu May 31, 2007 7:13 pm    Post subject:
Reply with quote

Hello and welcome to the forums icon_smile.gif

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us