IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Changing Copy Book Structure in Cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ranjith_taurean

New User


Joined: 12 Jun 2006
Posts: 4

PostPosted: Tue Jan 02, 2007 12:11 pm
Reply with quote

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
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Tue Jan 02, 2007 1:33 pm
Reply with quote

Seems it is a copybook having working storage vaiable definition.

Does that change applicable only to the program you mentioned.
Back to top
View user's profile Send private message
Neilabh

New User


Joined: 29 Nov 2006
Posts: 8
Location: India

PostPosted: Tue Jan 02, 2007 2:48 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jan 02, 2007 3:24 pm
Reply with quote

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
View user's profile Send private message
ranjith_taurean

New User


Joined: 12 Jun 2006
Posts: 4

PostPosted: Tue Jan 02, 2007 5:04 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jan 02, 2007 5:11 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top