5250 error 0014: Mandatory fill field, must fill to exit
5250 error 0014 means you tried to leave a mandatory-fill field that is only partly filled. Once you start typing in such a field, every position must be filled, or the field cleared completely, before the cursor can move on.
Other names for this code
Also written as 0014, error 0014, 5250 0014, operator error 0014, mandatory fill field must fill to exit, 5250 error 0017, AS/400 error 0014.
What it means
A programmer can mark an input field as mandatory fill with CHECK(MF) in the DDS, or with CHGINPDFT(MF). The rule is all or nothing. You can skip the field entirely, but if you change any part of it, every position must hold a character. Blanks count as characters, so the rule is about keying every position, not about the value.
The display station enforces this when you try to leave the field. If you press a key that would move the cursor out, such as Field Advance (Tab), and the field is neither full nor untouched, the keyboard locks and 0014 appears. Code 0017 is the same rule caught by a different key. It appears when you press Field Exit, Field+ or Field- in a mandatory-fill field that isn't complete.
Mandatory fill suits values that always have the same length, such as an eight-digit date, a branch code or a fixed-length account number. A short value in those fields is nearly always a typing slip, and the rule catches it before the screen goes back to the program. IBM doesn't allow CHECK(MF) together with the right-adjust checks RB and RZ, so a mandatory-fill field never pads a short value for you.
Common causes
- You typed a short value, for example seven digits in an eight-digit date field, and pressed Tab.
- You pressed Field Exit to finish a short value. Field Exit would blank the rest of the field, which leaves it incomplete, so you get 0017.
- You started typing in the field by mistake and then tried to move to another field.
- The value you have really is shorter than the field, because the screen was designed for values of one fixed length.
How to find the problem
- Count the positions. The field's underline or highlight shows its full length, and the cursor shows how far you got.
- Press Help while 0014 or 0017 is on the error line to see the system's text for the error.
- In the display file source, look for
CHECK(MF)on the field, orCHGINPDFT(MF)at record or file level. A file-level CHGINPDFT(MF) makes every input field in the file mandatory fill.
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 type characters in every remaining position of the field.
- For a number shorter than the field, type leading zeros, for example 00012345, if the application treats the value as a number or code.
- To leave the field empty instead, move the cursor back to its first position and press Field Exit. That blanks the whole field, and an empty field is allowed.
- For programmers, if short values are valid, remove CHECK(MF) and check the length in the program. For a numeric field,
CHECK(RZ)pads a short value with zeros on Field Exit, which may be what you wanted from MF. - For programmers, say in the field label how many characters it needs, for example Date (YYYYMMDD).
Read this error in WND Terminal
For a visible 5250 error 0014 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.
Related codes
Questions
What is the difference between 0014 and 0017?
Both come from a mandatory-fill field that is only partly filled. 0014 appears when you press a key that moves the cursor out of the field. 0017 appears when you press Field Exit, Field+ or Field-.
Can I leave a mandatory-fill field empty?
Yes. If you never type in it, you can move past it. If you have started, go back to its first position and press Field Exit to blank it.
Do spaces count when filling the field?
Yes. A blank is a valid character for the display station, so a field filled with spaces passes the mandatory-fill rule. The program may still reject the value.