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 with REPLACING Option to replace partial Text

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

New User


Joined: 25 Jan 2010
Posts: 11
Location: Noida

PostPosted: Mon Mar 29, 2010 3:32 pm    Post subject: COPY with REPLACING Option to replace partial Text
Reply with quote

I have a Copybook

Copybook AHD-REC containing fields

05 AHD-ID
05 AHD-POL-NUM
05 AHD-DATE
etc ...

I want the partial Text "AHD" to be replaced by "HLD" in entire Copybook during my program RUN.

I have tried following , but they are not working.

a) 01 HOLD-REC COPY AHD-REC
replacing ==AHD== by ==HLD==

b) 01 HOLD-REC COPY AHD-REC
replacing :AHD: by :HLD:

c) 01 HOLD-REC COPY AHD-REC
replacing (AHD) by (HLD).

Please help me

thanks & regards
Manoj
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Mar 29, 2010 3:56 pm    Post subject:
Reply with quote

You might like to review this thread and the fine manual.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Mar 29, 2010 3:56 pm    Post subject:
Reply with quote

Whole words only or partial words with delimiters only....

The COPY statement with REPLACING phrase can be used to replace parts of words. By inserting a dummy operand delimited by colons into the program text, the compiler will replace the dummy operand with the desired text.

Replacing function in cobol
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 Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts Replace last name by first name anatol DFSORT/ICETOOL 10 Thu Mar 15, 2018 3:43 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm

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