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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
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

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