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
 
COPY REPLACE is not working

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

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Thu Nov 13, 2008 8:51 am    Post subject: COPY REPLACE is not working
Reply with quote

Hi friends,

I have a problem in COPY REPLACING statement in my COBOL program where in the string is not getting replaced.

COPY ADF406 REPLACING ==XXXX== BY ==IS01==.


Tha elements in copybook ADF406 are like this:

05 XXXX-GL-NO.

10 XXXX-GL-NO-E

10 XXXX-GL-NO-SYMBOL

05 XXXX-M-CODE


During compilation, The XXXX is not getting replaced by IS01
Can someone please tell me what is the problem?
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 Nov 13, 2008 9:29 am    Post subject:
Reply with quote

Hello,

What does happen? If you post what the compiler shows for this statement and any warnings at the end of the compile it will help.

You might also use the forum SEARCH in the COBOL part of the forum and look at several similar topics.
Back to top
View user's profile Send private message
k.junaid83

New User


Joined: 19 Apr 2006
Posts: 22
Location: bangalore

PostPosted: Thu Nov 13, 2008 10:48 am    Post subject:
Reply with quote

You would require to change your orignal copy book variables.
For the replacing command to work you would need to prefix and postfix the word u want to replace by :.So your orignal copybook will look like.


05 :XXXX:-GL-NO.

10 :XXXX:-GL-NO-E

10 :XXXX:-GL-NO-SYMBOL

05 :XXXX:-M-CODE


Now your copy statement will be as follows

COPY ADF406 REPLACING ==:XXXX:== BY ==IS01==.

Also refer http://ibmmainframes.com/viewtopic.php?p=121344&highlight=#121344
Back to top
View user's profile Send private message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Thu Nov 13, 2008 9:52 pm    Post subject: Reply to: COPY REPLACE is not working
Reply with quote

Thanks junaid83,
It was very helpful and worked.
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 LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts ISREDIT MACRO NOT WORKING! :cry: kirank889 TSO/ISPF 3 Thu Aug 03, 2017 5:46 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

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