Menu

#402 USAGE BIT implementation

unclassified
duplicate
5 - default
2021-08-27
2021-06-10
No

Hi GnuCOBOL team,

I'm not sure if this is the right place for that.

We would like to ask if the implementation of USAGE BIT is on the roadmap of GnuCOBOL.

We got a testcase, where we found out, that this seems to be parsed but not to be supported at the moment.

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

cobc tc1987.cbl

./tc1987

The program shows a message at the end, whether the test was passed or not passed.

Kind regards

Sebastian Steinweg
Easirun Europa GmbH

3 Attachments

Discussion

  • Simon Sobisch

    Simon Sobisch - 2021-06-15
     cobc --debug -Wall -xj tc1987.cbl
    tc1987.cbl:18: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:19: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:20: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:21: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:22: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:23: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:24: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:25: warning: USAGE BIT is not implemented [-Wpending]
    tc1987.cbl:32: warning: USAGE BIT is not implemented [-Wpending]
    GNU-redefines-bit              >> ee:0001987 >> GNU:0000000000 >> failed
    GNU-redefines-bit              >> ee:0001987 >> GNU:0000000000 >> failed
    

    All entries that are noted as "pending" are "roughly on the roadmap", in most cases the result of the compilation will be unexpected, sometimes you'll see errors later on.

    So far no one had any real need for USAGE BIT, so it isn't implemented yet - but a patch to do so would be highly welcomed and should not be too hard. @ssteinweg Do you consider creating one (from scratch, of course)?

     
  • Simon Sobisch

    Simon Sobisch - 2021-06-15
    • labels: --> BIT, boolean
    • status: open --> duplicate
    • assigned_to: Simon Sobisch
     
  • Simon Sobisch

    Simon Sobisch - 2021-06-15

    Duplicate of [feature-requests:#303], but provides at least one test case for that.

     

    Related

    Wish List: #303

  • Sebastian Steinweg

    We have taken a deeper look into the subject, including reviewing the implementation in COBOL-IT and the challenges involved in an older customer project, where the usage of BIT was extremely complex and risky( usage of up to PIC 1(32767)!!!). We have been able to identify the major steps that would be necessary to implement this requirement, and see some distinct activities required.

    1. Full implementation of Usage Bit behaviour in the data definition including behaviour in complex structures like Groups, Redefines etc.
    2. Standard MOVE syntax for transfer of data from group, field and the format B“0001“ etc. to initialize values.
    3. Building CBL_ routines and their usage for Bit Manipulation .
    4. Building intrinsic functions in order to use Bit manipulation, also in COBOL constructs within complex Calculations etc.

    In our view and based on what was required for the above mentioned customer project, the effort for an implementation would require at least 45-50 man days.

    We could imagine implementing this functionality, but there is no customer project or similar at the moment from our side, so currently there is no priority to spend ressources on this „project“. (the cobol-it customer has moved on to a standard packaged solution).

     
    • Simon Sobisch

      Simon Sobisch - 2021-08-27

      Thank you for the deeper look and the report back.

      We keep the other FR open for a later implementation of whoever does the work, feel free to come back to it when you see the need arising for a project.
      As you've already inspected this - maybe you want to provide a minor patch for [feature-requests:#235] first. :-)

       

      Related

      Wish List: #235


Log in to post a comment.