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
 

 

How can I include my COPY Book?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Tue Feb 17, 2004 8:51 pm    Post subject: How can I include my COPY Book?
Reply with quote

How can I include my COPY Book? Is there any special routines for that....
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Feb 18, 2004 12:17 am    Post subject:
Reply with quote

Hi priya,

If it's a COBOL copybook you code:

COPY my_copybook_member_name

in your pgm in a line where you would have coded the stmts if you were NOT using a copybook.

Remember that a copybook can contain executable COBOL stmts; you would code that in the PROC DIV.

Check your compile JCL to determine in which PDC your copybooks should reside. I think it's the SYSLIB DD stmt.

There's also a global change facility that allows you to change data name prefixes, etc. for each use of the copybook with a COPY stmt, e.g.:

01 abc-field1 .... from COPY stmt #1
.
.
01 abc-field6 ....
.
.
.
01 xyz-field1 ... from COPY stmt #2
.
.
01 xyz-field6 ....

HTH, Jack.
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Wed Feb 18, 2004 2:57 pm    Post subject:
Reply with quote

So far I can remember, if it is a procedure division copybook and contains executable statements then we should code INCLUDE and not COPY because it will be first PRECOMPILED and then COMPILED. INCLUDE is expanded in precompilation time and copy in compilation time. So if you code COPY in procure division then it will not be compiled properly.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Feb 19, 2004 9:58 am    Post subject:
Reply with quote

Hi Sandip,

I've always used Copy for PD stmts. But you may be right if the stmts contain DB2 code.

Regards, Jack.
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Thu Feb 19, 2004 2:13 pm    Post subject:
Reply with quote

Hi Jack,

I think for CICS code will create the same problem...in fact copybook containing precompilable statements like EXEC CICS or EXEC SQL will cause problem.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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