View previous topic :: View next topic
|
Author |
Message |
ranjith_taurean
New User
Joined: 12 Jun 2006 Posts: 4
|
|
|
|
Hi Techies,
I've a quick question for you guys. I've a copy book, which i am using in my cobol program. I need to change the level numbers for some of the fields in the copy book(not the whole copy book). I can do this with Replacing option, but it will effect all the fields, which are at the same level number. Can you suggest any idea for this?
Thanks n Regards
Ranjith |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Seems it is a copybook having working storage vaiable definition.
Does that change applicable only to the program you mentioned. |
|
Back to top |
|
|
Neilabh
New User
Joined: 29 Nov 2006 Posts: 8 Location: India
|
|
|
|
we can nrrow down our replacing domain by specifying limits.
Code: |
Command ===> c all .a .b 'DDDD' 'MMMM' Scroll ===> CSR
****** ***************************** Top of Data ******************************
.A //AAAAAAA
000006 //BBBBBBB
000009 //CCCCCC
000010 //DDDDDD
000011 //DDDDDD
.B // EEEEEEE
000013 //FFFFFFFF
000014 //GGGGGG
|
This way we can change selective occurences.
Hope this helps. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
If you only specify the level number, all levels get changed, but if you specify the level number and the data name, only that line will get changed. |
|
Back to top |
|
|
ranjith_taurean
New User
Joined: 12 Jun 2006 Posts: 4
|
|
|
|
Hi Thompson,
Thanks alot for the reply. But i really dont know how to mention the data name and level number. Can you guide me thru the syntax of it.
Once again, thanks alot for the help.
Regards
Ranjith |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
if "05 DATANAME PIC X."
then "COPY COPYBOOK
REPLACING == 05 DATANAME == WITH == 10 DATANAME =="
haven't tried it myself, but according to the FM, it should work.... |
|
Back to top |
|
|
|