How to parse large integers?

1
5

Work around for the checksum in languages that do not support integers with more than 30 chars:

Piece-wise calculation D mod 97:

1. Starting from the leftmost digit of D, construct a number using the first 9 digits and call it N.
2. Calculate N mod 97.
3. Construct a new 9-digit N from the above result (step 2) followed by the next 7 digits of D. If there are fewer than 7 digits remaining in D but at least one, then construct a new N, which will have less than 9 digits, from the above result (step 2) followed by the remaining digits of D.
4. Repeat steps 2–3 until all the digits of D have been processed. The result of the final calculation in step 2 will be D mod 97 = N mod 97.
1

The problem here lies in the fact that mendix uses longs but does not allow you to parse it. What you can do is create a java action that parses the string to a long value and then finish your calculation.

0

Do the checksum on a string level, parseInteger(substring , pos, 1)

Edit: There seems to be some java implementations available on internet like this