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
 

 

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 RULES(NOEVENPACK) in cobol jackzhang75 COBOL Programming 5 Wed Mar 29, 2017 12:47 am
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


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