Skip to content

Cobrix is not supporting, Inserting picture clause #505

Open

Description

@Loganhex2021

Describe the bug @yruslan

Cobrix is not supporting, Inserting picture clause. If the data type has BBBB then spaces needs to be place in those place.
For Example :
Data Type : PIC 9(06)BBBB needs to return '123 ' if the value is 123.
Refer the below link.
https://www.mainframestechhelp.com/tutorials/cobol/picture-clause.htm

Code snippet that caused the issue

  spark.read
   .format("cobol")

Expected behavior

A clear and concise description of what you expected to happen.

Context

  • Cobrix version:
  • Spark version:
  • Scala version:
  • Operating system:

Copybook (if possible)

         01  RECORD.
           05  FIELD1    PIC 99B99B99.

Input => 156082
output => 15 60 82
Attach a small data file that can help reproduce the issue, if possible.

@yruslan
Could you please help on this?

Activity

  1. yruslan commented on Jun 16, 2022

    @yruslan
    Collaborator

    Hi, sorry for the late reply.

    Cobrix parses source data as numbers. Numeric representation in Spark does not support inserting spaces between digits in numbers since Spark represents numbers as binary numbers.

    Theoretically, such pictures could be supported by decoding numbers to strings. Adding this to implementation plans.

  2. added
    enhancementNew feature or request
    acceptedAccepted for implementation
    and removed
    bugSomething isn't working
    on Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedAccepted for implementationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions