== Why is this an issue?

COBOL programs that include ``++EXEC SQL INCLUDE++`` statements must be pre-processed with an IBM DB2 precompiler or coprocessor before compilation. The precompiler does not require a period after the closing ``++END-EXEC++``, but the coprocessor does. For portability, a period should always be used.


=== Noncompliant code example

[source,cobol]
----
EXEC SQL INCLUDE ... END-EXEC  *> Noncompliant; '.' missing
----


=== Compliant solution

[source,cobol]
----
EXEC SQL INCLUDE ... END-EXEC.
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Add a period ('.') after this "END-EXEC".


=== Highlighting

``++END-EXEC++``


'''
== Comments And Links
(visible only on this page)

=== on 13 Oct 2016, 18:22:41 Nicolas Bontoux wrote:
+References+:

* https://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/ref/rpdb211.htm[Differences in how the DB2 precompiler and coprocessor behave] (section: _Period at the end of EXEC SQL INCLUDE statements_)
* http://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/MG/igymch1802.htm[Considerations when moving to the coprocessor] (section: _Period at the end of an EXEC SQL INCLUDE statement_)
* http://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/apsg/src/tpc/db2z_sqlstatementscobol.html[Programming COBOL applications that issue SQL statements] : _For an SQL INCLUDE statement, the DB2 precompiler treats any text that follows the period after END-EXEC, and on the same line as END-EXEC, as a comment. The DB2 coprocessor treats this text as part of the COBOL program syntax._

endif::env-github,rspecator-view[]
