Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Inspect verb to replace words

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
shoumitra sutradhar

New User


Joined: 22 May 2008
Posts: 3
Location: pune

PostPosted: Wed Jul 02, 2008 3:06 pm    Post subject: Inspect verb to replace words
Reply with quote

Hi! is it possible to use a inspect verb line this.
INSPECT WS-VAR1 REPLACING ALL "MISS" BY "BMS".

Can i replace all four words"MISS" by three words"BMS".
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Jul 02, 2008 3:12 pm    Post subject:
Reply with quote

have you tried or bothered to read the manual?
Back to top
View user's profile Send private message
vv

New User


Joined: 06 Jan 2008
Posts: 10
Location: bangalore

PostPosted: Wed Jul 02, 2008 3:32 pm    Post subject: use inspect with converting option
Reply with quote

sys is

inspect id-1 converting 'old string' by 'new string' before initial spaces.


venkat.
Back to top
View user's profile Send private message
Antonio Barata
Warnings : 1

New User


Joined: 04 Apr 2007
Posts: 37
Location: Lisbon, Portugal

PostPosted: Wed Jul 02, 2008 4:13 pm    Post subject: Re: Inspect verb
Reply with quote

shoumitra sutradhar wrote:
Hi! is it possible to use a inspect verb line this.
INSPECT WS-VAR1 REPLACING ALL "MISS" BY "BMS".

Can i replace all four words"MISS" by three words"BMS".


Hi
Why don't you try running it just to see what happens?
The program could be only one display at the beginning with the contents of ws-var-1, the INSPECT statement and another display in the end.
Back to top
View user's profile Send private message
shoumitra sutradhar

New User


Joined: 22 May 2008
Posts: 3
Location: pune

PostPosted: Wed Jul 02, 2008 4:31 pm    Post subject: Inspect verb
Reply with quote

I tried and know that changeing field and the replacing field has to be same, but i wanted some new tricks to any way replace with different size.
Back to top
View user's profile Send private message
Antonio Barata
Warnings : 1

New User


Joined: 04 Apr 2007
Posts: 37
Location: Lisbon, Portugal

PostPosted: Wed Jul 02, 2008 5:37 pm    Post subject: Re: Inspect verb
Reply with quote

shoumitra sutradhar wrote:
I tried and know that changeing field and the replacing field has to be same, but i wanted some new tricks to any way replace with different size.


The INSPECT statement has a wide range of options and possibilities.
I think that you really should read the manual and, try out the different options, and then choose the one that you think will do it better.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us