Menu

#646 Bugs with Packed Decimal Scaled (P) Data

GC 4.0
accepted
7
2022-02-22
2020-06-12
No

Attached: data_packed1.at and testsuite.log.

data_packed1.at contains 9 tests at present. It is three groups of three tests each. It tests for correct values stored in scaled COMP-6, COMP-3, and PACKED-DECIMAL variables with pictures of 999P, 999PP, and 999PPP. Eight of the nine tests fail. While I intend to extend this series of tests, I felt the initial findings were worth registering with the project. This was triggered by @rdubner's reports some time ago on the "devel" list.

I feel this feature is sufficiently obscure that this can be deferred to 4.0.

2 Attachments

Discussion

  • Edward Hart

    Edward Hart - 2020-06-13
    • labels: --> arithmetic, packed-decimal
    • status: open --> accepted
    • Group: unclassified --> GC 4.0
    • Priority: 5 - default --> 7
     
  • Edward Hart

    Edward Hart - 2020-06-25

    I had begun writing a patch for this - however, it seems I forgot to save a patch and then reverted all my changes. Such is life when you use Subversion.

    I do at least remember the one big, subtle issue I came across: there is currently no way for libcob to distinguish between packed-decimals with a PIC of VPPP999 and VPPPP99 (for example). Consider their cob_fields:

    • scale: both 6.
    • size: both 2.
    • digits: both 6 digits.
    • pic: both absent (since they're not numeric-edited items).
    • flags: identical (except possibly for NO_SIGN_NIBBLE, which doesn't help).

    I suggest adding to cob_attr a field for the number of P's in the PIC.

     

    Last edit: Edward Hart 2020-06-25
  • Ron Norman

    Ron Norman - 2022-02-22
    • assigned_to: Ron Norman
     
  • Ron Norman

    Ron Norman - 2022-02-22

    I have done some work on this for the 4.0 version. It likely has never worked before.
    It should now work for COMP-3, COMP-6 as well as COMP-5.

     

Log in to post a comment.