What should I do with the following message?

 cobol1: warning: depth line copybook filename
                  ----- ---- ------------------------------------------------
 cobol1: warning:     1    1 prog.cob
 cobol1: warning:     2    1 copy1.CPY
 cobol1: warning:     3    1 copy2.CPY
 cobol1: warning:     4    1 copy3.CPY
 cobol1: error: copy3.CPY:1: recursive copybook: 'copy1.CPY' includes itself


A COBOL copybook is similar to a C include file, but cannot include
itself, even indirectly.  That's the rule.  There's no form of "include
guard".

(There's good reason.  The Compiler Directing Facility (CDF) supports
text substitution on the copybook, so that the same input may have
names with different prefixes, say, in different programs.)

No rule says the compiler must tell the user the route to copybook
recursion, but I'll bet it's not controversial.

As of now, the warning messages are sent straight to fprintf(3), and
only the error goes to emit_diagnostic_valist().  Or will, after I sort out 
locations within the CDF.  

--jkl

Reply via email to