#14 Improper ODO Calculation

Release 4.4
closed
nobody
None
2014-05-10
2014-05-08
No

DEBUG:stingray.cobol.defs:Getting Attribute( name='CHD-NO-ALP-STAG-SEGS', position=114, offset=165, size=2, dimensionality=() ) from LazyRow(sheet=ExternalSchemaSheet(EBCDIC_File('
DEBUG:stingray.cobol.defs:Getting Attribute( name='CHD-NO-ALP-STAG-SEGS', position=114, offset=165, size=2, dimensionality=() ) from LazyRow(sheet=ExternalSchemaSheet(EBCDIC_File('
DEBUG:stingray.cobol.defs:<< Exit 03 CHD-ALP-STAG-SEGMENTOCCURS DEPENDING ON CHD-NO-ALP-STAG-SEGS. size=608*3136=1906688

looking at the copybook:

019102 04 CHD-NO-ALP-STAG-SEGS PIC S9(4)V COMP.

145900 03 CHD-ALP-STAG-SEGMENT OCCURS 0 TO 1 TIMES
145901 DEPENDING ON CHD-NO-ALP-STAG-SEGS.

The value of 3136 is neither 0 nor 1.

It's likely the PIC S9(4)V COMP is handled incorrectly.

Discussion

  • Steven F. Lott

    Steven F. Lott - 2014-05-08

    3136 == 0x0C40

    The 0x40 is an EBCDIC space character. Not sure of this is relevant.

    It's possible that the offset to CHD-NO-ALP-STAG-SEGS is wrong.

    It's also possible that some kind of modulus or mask is used to get only some of the bits of the 2-byte value.

     
    Last edit: Steven F. Lott 2014-05-08
  • Steven F. Lott

    Steven F. Lott - 2014-05-09

    There seems to be a "maximum length rule" for complex ODO structures.

    It's possible that a value greater than the upper bound is clamped at the upper bound.

     
  • Steven F. Lott

    Steven F. Lott - 2014-05-10
    • status: open --> closed
     
  • Steven F. Lott

    Steven F. Lott - 2014-05-10

    See Ticket #15 -- same problem.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks