
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
If a SQL ``++TABLE++`` is declared but not used in the program, it can be considered dead code and should therefore be removed. This will improve maintainability because developers will not wonder what the variable is used for.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
EXEC SQL
|
|
DECLARE DSN8B10.DEPT TABLE -- Noncompliant
|
|
( ... )
|
|
END-EXEC.
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Remove this table "XXX" declaration; it is never used.
|
|
|
|
|
|
=== Highlighting
|
|
|
|
``++DECLARE ... TABLE++``
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 6 Oct 2016, 11:42:58 Pierre-Yves Nicolas wrote:
|
|
IBM reference for DECLARE...TABLE: \http://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_declaretable.html
|
|
|
|
=== on 29 Nov 2016, 11:42:13 Pierre-Yves Nicolas wrote:
|
|
We should not raise an issue when a ``++DECLARE...TABLE++`` is inside a copybook: a COBOL program, which could be in another project, could use this copybook and this ``++DECLARE...TABLE++`` declaration.
|
|
|
|
endif::env-github,rspecator-view[]
|