rspec/rules/S1619/cobol/rule.adoc
2022-02-04 16:28:24 +00:00

31 lines
651 B
Plaintext

The storage of a packed numeric field is most efficient when you code an odd number of digits in the PICTURE description, so that the leftmost byte is fully used. Packed-decimal items are handled as fixed-point numbers for arithmetic purposes.
== Noncompliant Code Example
[source,cobol]
----
01 VAL PIC 9(6) COMP-3.
----
== Compliant Solution
[source,cobol]
----
01 VAL PIC 9(5) COMP-3.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]