(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
library.

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
problem.

Scott Lindstrom



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




List,

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
that
have the same name.

It was my understanding from others that I've spoken with that source
"type"
(or suffix - not sure of the correct term in the iSeries world) should be
CBLLE for COBOL/ILE and SQLCBLLE for COBOL/ILE+SQL.

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
to
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!

--
Regards,

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





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.