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
 
Changing Copy Book Structure in Cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Changing Copy Book Structure in Cobol
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: 1452
Location: Chicago, IL

PostPosted: Tue Jan 02, 2007 1:33 pm    Post subject: Re: Changing Copy Book Structure in Cobol
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    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue Jan 02, 2007 3:24 pm    Post subject:
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    Post subject: Re: Changing Copy Book Structure in Cobol
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: 3158
Location: Tucson AZ

PostPosted: Tue Jan 02, 2007 5:11 pm    Post subject:
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    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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
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