| IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc... Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
shoumitra sutradhar
Joined: 22 May 2008
Posts: 3
Location: pune
|
| Posted: Wed Jul 02, 2008 3:06 pm Post subject: Inspect verb to replace words |
|
|
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 |
|
dbzTHEdinosauer
Joined: 20 Oct 2006
Posts: 1520
Location: germany
|
| Posted: Wed Jul 02, 2008 3:12 pm Post subject: |
|
|
| have you tried or bothered to read the manual? |
|
| Back to top |
|
vv
Joined: 06 Jan 2008
Posts: 10
Location: bangalore
|
| Posted: Wed Jul 02, 2008 3:32 pm Post subject: use inspect with converting option |
|
|
sys is
inspect id-1 converting 'old string' by 'new string' before initial spaces.
venkat. |
|
| Back to top |
|
Antonio Barata
Joined: 04 Apr 2007
Posts: 36
Location: Lisbon, Portugal
|
| Posted: Wed Jul 02, 2008 4:13 pm Post subject: Re: Inspect verb |
|
|
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 |
|
shoumitra sutradhar
Joined: 22 May 2008
Posts: 3
Location: pune
|
| Posted: Wed Jul 02, 2008 4:31 pm Post subject: Inspect verb |
|
|
| 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 |
|
Antonio Barata
Joined: 04 Apr 2007
Posts: 36
Location: Lisbon, Portugal
|
| Posted: Wed Jul 02, 2008 5:37 pm Post subject: Re: Inspect verb |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|