(I don't do COBOL everyday, so forgive me if I have something wrong here).

Since we have separate libraries for development and production source
code, we use this version of a COPY statement:

      COPY member OF filename.

The library list would be searched and find the copybook in the development

When the program gets recompiled into production, the production version of
the copybook would be found.  (If the copybook was changed as part of the
modification, then of course it has to be promoted to production also).

But since you have the same member name for the program and the copybook,
this does not sound like it would work for you.

You can use this format of the COPY if that helps you:

       COPY member OF library-filename.

Where 'library' is the name of the library where the copybooks are (not the
program source).  Then the fact that they are the same name should not be a

Scott Lindstrom

             <mrosinger@cciws.                                          To 
             com>                      cobol400-l@xxxxxxxxxxxx             
             Sent by:                                                   cc 
             s+slindstrom=pact                                     Subject 
             iv.com@xxxxxxxxxx         [COBOL400-L] naming conventions for 
             om                        programs and copybooks...           
             11/03/2006 01:40                                              
             Please respond to                                             
             COBOL Programming                                             
                  on the                                                   


I need some advice on naming conventions for programs and copybooks. What
brought this to my attention is that I discovered in my conversion efforts
that I have a COBOL program (sub-routine) with a corresponding copybook
have the same name.

It was my understanding from others that I've spoken with that source
(or suffix - not sure of the correct term in the iSeries world) should be

I realize it is probably better not to have a copybook and program with the

same names, but how is this handled in the iSeries world. Separating them
two different sourcefiles may not be enough because both may be searched
during a compile procedure.

Is there a way to differentiate between a program source vs. a copybook?

What is the recommended way to handle this problem and why?  TIA!


Michael Rosinger
Systems Programmer / DBA
Computer Credit, Inc.
640 West Fourth Street
Winston-Salem, NC  27101
m rosinger at cciws dot com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.