AbsaOSS / AbsaOSS/cobrix

COMP-3 field is being read with a value 3 less than expected value

未关闭
#639 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
Scala
星标
170
派生
96
平均合并
57 分钟
30 天内合并 PR
2

描述

Trying to read a file which has the following
07 IM-LKUP-LM-HH-MM-SS PIC S9(7) COMP-3.

The resulting value for each record is coming up with a value thats 3 more than expected.
For instance instead of seeing 131444 - its resulting in 131441
Happens for every single record - all other fields are being parsed correctly - this is the only COMP field.

Added the following option
.option("debug", "hex")
and I see
{131441, 0131441F}
Here is what I see in the file using a hex editor: (ignore double quotes)
"‘à"

Any idea why this is happening and how to fix it.

Is this because of an unsigned COMP field and the sign value should be ignored but the code is somehow including it in the value?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。