afrunt / jach

Java library for reading and writing ACH/NACHA documents
Apache License 2.0
44 stars 37 forks source link

Specific Bank Origination/Reject entry detail transaction Id contains alphanumeric #2

Closed mcgovardhan closed 6 years ago

mcgovardhan commented 6 years ago

Hi, While parsing the Origination/Reject file we are getting parsing error as described below. Our bank specification says as below. For rejects, positions 80-87 of the entry detail (type 6) record are changed to REJ0xxxx, where xxxx is the reject code.

While parsing the parser it is throwing error . Caused by: com.afrunt.jach.exception.ACHException: Cannot parse string REJ06030 to number for field EntryDetail->traceNumber[Long]

Could you please advise on this issue . Let us know if you need any more details.

afrunt commented 6 years ago

@mcgovardhan could you provide some more details about the batch type and details about the spec itself. Maybe I just need to implement those additional batch type and specific format of the detail entry (6th record). I ran jach against the millions of real ACH documents (BAML, PNC, 5/3) to parse/write and there were no errors. Probably, you found some edge case. So, I'm waiting for details to fix it. Need to say, that it is strange, that you want to write some non-numeric value to traceNumber (last 15 symbols of each detail record). You could mask sensitive data and attach the actual document here

screen shot 2018-02-10 at 5 02 25 pm
mcgovardhan commented 6 years ago

Thanks a lot for replying to me .. As part of Origination/Reject file we are getting alpha numeric in case of Reject record. I mean For Origination record we will have numeric value.. for Reject record we will have Alpha numeric value. Below are the details we have for trace number.. Trace number Position 80-94 Length 15 For file-, batch-, and item-level rejects, positions 80-87 changed to REJ0xxxx, where xxxx is the reject reason code. For all other items, this field is our bank-assigned trace number beginning with 01234567. So basically the parser is failing for Rejected record..

Example:- 081123456712013 Reject Example;- REJ060300000002

ERROR :- Caused by: com.afrunt.jach.exception.ACHException: Cannot parse string REJ060300000001 to number for field EntryDetail->traceNumber[Long]

afrunt commented 6 years ago

@mcgovardhan hm, it is breaking the NACHA rules and format

mcgovardhan commented 6 years ago

Looks like our bank file has custom based origination/reject file..

afrunt commented 6 years ago

@mcgovardhan yes, and in this case, your format is not an ACH anymore, because it violates the core constraints

mcgovardhan commented 6 years ago

Thanks a lot for providing your input on this issue.I'm closing this issue.