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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
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
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us