== Why is this an issue?

Host variables are used for passing data back and forth from the database to a COBOL program via SQL. In order to keep that transmission clear and free of errors, the format of each host variable should match its corresponding database column type. 


This rule raises an issue when column and corresponding host variable don't match in terms of numeric vs character data, and when the host variable is smaller than the column width.


=== Noncompliant code example

[source,cobol]
----
TODO
----


=== Compliant solution

[source,cobol]
----
TODO
----


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

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

=== Message

Correct the format of "xxx" to match "[relevant bit of column config]".


=== Highlighting

* primary: host var 
* secondary: column name
** message: "X" is "[relevant bit of config]".


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

=== on 6 Oct 2016, 12:25:19 Pierre-Yves Nicolas wrote:
This RSPEC will need to define precisely which DB2 types are "compatible" with which COBOL types.

=== on 13 Oct 2016, 13:43:30 Ann Campbell wrote:
\[~pierre-yves.nicolas] take a look at the http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/apsg/src/tpc/db2z_equivalentcoboldatatypes.html[IBM spec] & see if you want to replicate that into the RSpec. Maybe we add that reference to the See section?

=== on 14 Oct 2016, 17:49:12 Pierre-Yves Nicolas wrote:
\[~ann.campbell.2] The IBM spec definitely helps and shows that it would take a long time to cover all possible cases. We should probably focus on the most common cases that we want to catch. The most basic rule is "don't mix numeric with character". We also have to check the length of variables: the "receiving" side should be long enough to store the "sent" value. I'm not sure how we should describe all of that.

=== on 17 Oct 2016, 16:06:22 Ann Campbell wrote:
\[~pierre-yves.nicolas] I've expanded the description slightly

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