Menu

#34 net.sf.JRecord.Common.RecordException: Invalid sign in field: CUST-ID 0 > 250000

v1.0_(example)
open
None
1
2022-07-09
2022-07-08
Anonymous
No

Could you please help me out with below issue, I am using JRecord 0.90 and I have manually build the cb2xml package and added as external jar in my project build path configuration. I have passed the attached copybook and epsidic data with | as delimiter. I am new to this process and could not figure out the issue.

*** -------------------------------------------------------
*** Warning there was no "cb2xml.properties" file,
*** using the default Cobol columns of 6 to 72
*** -------------------------------------------------------
*** using start column = 6, end column = 72
Copy Book level count ........ 1
Exception in thread "main" net.sf.JRecord.Common.RecordException: Invalid sign in field: CUST-ID 0 > 250000
at net.sf.JRecord.Types.smallBin.TypePackedDecimal9.asUnscaledLong(TypePackedDecimal9.java:133)
at net.sf.JRecord.Details.fieldValue.FieldValueSmallBin.asBigDecimal(FieldValueSmallBin.java:59)
at net.sf.JRecord.Details.fieldValue.BaseFieldValueLine.asString(BaseFieldValueLine.java:167)

3 Attachments

Discussion

  • Bruce Martin

    Bruce Martin - 2022-07-09
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,3 @@
     cust-record-copybook.txt (518 Bytes; text/plain)
    +customer.zip (2.9 kB; application/x-zip-compressed)
     sample-customer-data.ebcdic (432 Bytes; application/octet-stream)
    
     
  • Bruce Martin

    Bruce Martin - 2022-07-09

    See the attached zip file, this should read the sample file.

    The file has a EBCDIC line separator (Cobol Line Sequential) in it and is also a binary file. This is a very bad idea because the EBCDIC line separator can also occur in binary fields leading to problems. I would look at *how the file was created !!!

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB