Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us