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 and replacing....

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

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Thu Apr 15, 2010 7:50 pm    Post subject: Inspect and replacing....
Reply with quote

Hi,
I have a Input filed with PIC X(50)
in that I may get data as follows
05 WS-VAR-A PIC X(50)

05 WS-OTHER-NAME PIC X(50)

WS-VAR-A = ANDREW*FLINTOFF
WS-OTHER-NAME = SACHIN

and finally at the end WS-VAR-A should have ANDREW*SACHIN
WS-VAR-A = ANDREW*SACHIN

I have tryed with INSPECT and REPLACE but its not working

l;ike

INSPECT WS-VAR-A REPLACING BY WS-OTHER-NAME BY AFTER C-ST

where C-ST defined as '*'

Can anyone explain ???
Back to top
View user's profile Send private message

Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Thu Apr 15, 2010 9:32 pm    Post subject: Reply to: Inspect and replacing....
Reply with quote

Do you need solution for your requirement or explanation for why your method dint worked?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Thu Apr 15, 2010 10:05 pm    Post subject:
Reply with quote

Hi !

Plse look at string/unstring with count & pointer options
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 Apr 15, 2010 10:14 pm    Post subject:
Reply with quote

Hello,

Quote:
I have tryed with INSPECT and REPLACE but its not working

l;ike

INSPECT WS-VAR-A REPLACING BY WS-OTHER-NAME BY AFTER C-ST
What you wanted is clear, but there is no reason to assume the compiler will generate the desired code. . .

When trying something new, it is best to review the material in the manual before coding/testing. To help with this, there is an "IBM Manuals" link at the top of the page. At the top of the list are manuals for various COBOL compilers.

If you read something n the manual that is not clear, post what you found and your doubt. Someone will be able to clarify.
Back to top
View user's profile Send private message
div

New User


Joined: 01 Jul 2007
Posts: 1
Location: bangalore

PostPosted: Wed Apr 21, 2010 1:09 pm    Post subject:
Reply with quote

INSPECT WS-VAR-A REPLACING CHARACTERS BY WS-OTHER-NAME AFTER C-ST


AFTER INITIAL '*'
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: Wed Apr 21, 2010 7:49 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

Yup, you've "been here" for a while, but this is your first post icon_smile.gif

When posting a "solution" it is best to provide more than something cryptic. . .

It is surely not clear as to why there are 2 "after"s. . .

Showing code can be helpful, but providing a bit of an explanation would be even more helpful.
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 replacing junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Inspect statement spoorni COBOL Programming 5 Mon Jun 06, 2016 9:53 pm
No new posts Replacing Start Transid with LINK pkmurali CICS 12 Tue Apr 19, 2016 8:22 pm
No new posts ADRDSSU Restore - How to prevent repl... Lipi.Prasannan JCL & VSAM 12 Fri Oct 02, 2015 12:13 am

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