Menu

#406 equal field values in case of compressed fields for CA Realia

GC 3.x
open
nobody
5 - default
2021-08-25
2021-06-17
No

Hi GnuCOBOL team,

we serching for an option or flag to get the same results with GnuCOBOL as in case of CA Realia.

The attached testcase performs some operations and compares values with CA Realia results, unfortunately not all of them are equal (2 times).

We tried to use -std=realia but without success.

Please take a look in the attached testcase while using the script tc3540.sh:

cobc -x tc3540.cbl

./tc3540

The expected result is:

Numerisch
0x 31 31 31
Sign Leading
0x 31 31 31
0x 21 31 31
Sign Trailing
0x 31 31 31
0x 31 31 21
Sign Leading Sep
0x 2B 31 31 31
0x 2D 31 31 31
Sign Trailing Sep
0x 31 31 31 2B
0x 31 31 31 2D
Comp3 Signed
0x 11 1C
0x 11 1D
Comp3 Unsigned
0x 11 1F

instead of:

Numerisch
0x 31 31 31
Sign Leading
0x 31 31 31
0x **71** 31 31
Sign Trailing
0x 31 31 31
0x 31 31 **71**
Sign Leading Sep
0x 2B 31 31 31
0x 2D 31 31 31
Sign Trailing Sep
0x 31 31 31 2B
0x 31 31 31 2D
Comp3 Signed
0x 11 1C
0x 11 1D
Comp3 Unsigned
0x 11 1F

Kind regards

Sebastian Steinweg
Easirun Europa GmbH

3 Attachments

Discussion

  • Simon Sobisch

    Simon Sobisch - 2021-06-17
    • labels: --> Realia, numeric
    • Group: GC 3.1 --> GC 3.x
     
  • Simon Sobisch

    Simon Sobisch - 2021-06-17

    Do I understand that correct that you effectively want, additional to -fsign=ebcdic and -fsign=ascii a new -fsign=ascii-realia (identical to ascii in all places but non-separate signs)?

    If yes - What do you think about providing a patch (and copyright assignment for this and possibly future contributions)?

    The change would be:

    • adjustment in handling -fsign (cobc/cobc.c), the new one would place and therefore generate "2" (ebcdic generates as "1")
    • adjustment in numeric.c to explicit check the ebcdic_sign for zero/one/two and a minor adjustment to do the appropriate calculation
    • Changelog entries in cobc + libcob
    • ideally: extending the current testcase for this third option


    Can you point to documentation about this (ideally Realia or possibly MF)? Is that always "minus 0x10"?

     

    Last edit: Simon Sobisch 2022-01-03
  • Sebastian Steinweg

    Your change suggestion is correct in our view.

    It's always "minus 0x10".

    The problem is the reference to the documentation.

    The topic belongs to a migration project in the past from CA Realia to another compiler, were the display of sign seperate was a topic, that should be implemented.

    The change in that project was done by the compiler manufacturer and we did not have a CA Realia documentation in physical form.

    We found one online, but there are two things.

    It is written in old Windows help form (.HLP files) which are not supported from newer windows systems and after solving this the SIGN CODING fact seems not to be part of the documentation.

    We attached the documentation, maybe we overlooked something or if not you can keep it maybe for other issues.

    So in general this is not something with priority, because there is no actual customer project where this should be implemented.

     

    Last edit: Sebastian Steinweg 2021-08-25

Log in to post a comment.