Terminal screen error

5250 error 0015: Check digit error

5250 error 0015 means the number typed in a self-check field failed its check-digit test. The last digit doesn't match what the modulus 10 or modulus 11 calculation expects from the other digits, so the number was most likely mistyped.

Other names for this code

Also written as 0015, error 0015, 5250 0015, operator error 0015, check digit error, self-check field error, modulus 10 check, AS/400 error 0015.

What it means

Account numbers, item numbers and member numbers often end in a check digit worked out from the other digits. If one digit is wrong, or two are swapped, the check digit no longer fits. A programmer can ask for this test on a field with CHECK(M10) or CHECK(M11) in the DDS, for modulus 10 or modulus 11, or with the forms CHECK(M10F) and CHECK(M11F). When the display station finds that the check digit doesn't fit, it locks the keyboard and shows 0015.

The rightmost digit is always the check digit. For modulus 11, IBM's DDS reference describes the method. Each digit of the base number is multiplied by a weight, starting with 2 at the right and rising to 7, then starting again at 2. The products are added, and the remainder after dividing by 11 decides the check digit. Some base numbers give a remainder that has no valid check digit, and IBM tells programmers not to issue those numbers at all.

The two forms differ in timing. With M10F or M11F the number is checked as it is typed into the field. With M10 or M11 it is checked when Enter or a function key is pressed. IBM's 5291 operator guide ties 0015 to the number you have just entered. IBM's DDS reference doesn't say whether a failed check at Enter shows 0015 or a message. A self-check field holds at most 31 digits if it is numeric.

Common causes

  • One digit mistyped, often a neighbor on the numeric keypad, such as 4 for 7.
  • Two digits swapped, such as 1243 for 1234. Check digits exist to catch this kind of slip.
  • A digit left out or typed twice, which moves every digit to a different weight.
  • The number belongs to another numbering scheme, for example an old account number from before check digits were added, or a number from another system that uses a different method.
  • The number was issued without a valid check digit, for example assigned by hand.

How to find the problem

  1. Compare the number on the screen with the source document digit by digit. Look hardest at swapped neighbors.
  2. Press Help while 0015 is on the error line to see the system's text for the error.
  3. In the display file source, look for CHECK(M10), CHECK(M10F), CHECK(M11) or CHECK(M11F) on the field. That tells you which method applies, so you can work out the expected check digit by hand if a number keeps failing.

How to fix it

  • Press Reset (also called Error Reset) to free the keyboard. In many PC emulators Reset is the left Ctrl key by default. Then retype the whole number carefully.
  • If a number you are sure of keeps failing, don't try variations until one passes. Report it to whoever looks after the application, with the number, because either the number or the field's method is wrong.
  • For programmers, make sure the field uses the same method, modulus 10 or modulus 11, as the system that issues the numbers. A field can't have both, and it can't have both M10 and M10F.
  • For programmers, if some valid numbers have no check digit, such as legacy accounts, remove the CHECK and validate in the program, where you can allow the exceptions.
  • For programmers, note the restrictions. M10F and M11F can't be used in a file with USRDSPMGT or on a field with CHKMSGID or WRDWRAP, and option indicators aren't allowed on any of the four.

Read this error in WND Terminal

For a visible 5250 error 0015 message, Explain this screen can help interpret the screen under IT’s configured AI policy. It does not establish the cause of a rejected host data stream. Preserve the exact status and follow the diagnostic steps in this article.

Try the WND Terminal sample with fictional data · 3270 emulator features and installation · 5250 emulator for IBM i

IBM documentation

IBM Personal Communications documentation. Use the documentation for your installed release.

This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.

Report a correction to WND Software.

Questions

What does check digit error mean on an IBM i screen?

The number you typed doesn't pass the modulus 10 or modulus 11 test set on the field. Its last digit doesn't fit the others, which usually means a typing mistake.

Why does a number I copied correctly still fail?

Either the number was issued without a valid check digit, or the field uses a different method from the one used to create the number. Report it rather than guessing.

Which digit is the check digit?

The rightmost one. The test works out what it should be from the other digits and compares the two.