5250 error 0016: Field Minus key not valid in this field
5250 error 0016 means you pressed Field- (Field Minus) in a field that can't hold a negative number, such as a text field. Field- works only in numeric fields that take a sign, so the display station locks the keyboard.
Other names for this code
Also written as 0016, error 0016, 5250 0016, operator error 0016, field minus key not valid, field- not valid in field, 5250 error 0026, AS/400 error 0016.
What it means
Field- does two jobs at once. It leaves the field, as Field Exit does, and it marks the number you just typed as negative. That only makes sense in a field that can hold a signed number. IBM's DDS reference lists Field- as a valid key in signed numeric fields (shift S), numeric-only fields (shift Y) and numeric-only character fields (shift M). Press it in a text field, or any field type that doesn't take a sign, and the display station refuses it with 0016.
Many people meet 0016 because of where the key sits. In many PC emulators Field- is on the minus key of the numeric keypad. Reach for that key to type a hyphen in a name or a part number, and the emulator sends Field- instead. The text field can't take it, so the keyboard locks.
A related code, 0026, comes from the same key in a numeric-only field. There, Field- needs a digit 0 to 9 in the field's last position to carry the sign. If that position holds something else, such as a blank, a comma or a period, the display station refuses the key with 0026.
Common causes
- You pressed the minus key on the numeric keypad in a text field to type a hyphen, and your emulator maps that key to Field-.
- You tried to enter a negative value in a field that holds a number as text, such as a code or reference field with shift A.
- Your emulator's keyboard map puts Field- on a key you use for something else.
- For 0026, you pressed Field- in a numeric-only field whose last position held a blank, comma or period rather than a digit.
How to find the problem
- Check which key you pressed. If it was the keypad minus, look at your emulator's keyboard map to see what that key sends in a 5250 session.
- Press Help while 0016 or 0026 is on the error line to see the system's text for the error.
- In the display file source, check position 35 for the field. Field- is valid with S, Y and M. A field with A, X or another character shift doesn't take it.
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 leave the field with Field Exit or Tab instead.
- To type a hyphen in a text field, use the hyphen key on the main part of the keyboard, not the keypad.
- If you type hyphens from the keypad often, remap the keypad minus in your emulator so it sends a plain minus character. Keep Field- on another key you can reach.
- For 0026, press Reset and correct the last position so it holds a digit, or leave the field with Field+ or Field Exit.
- For programmers, if the field should take negative values, define it as numeric with shift S or Y and the right decimal positions. Recreate the display file with CRTDSPF and recompile the programs that use it if the record format level changes.
Read this error in WND Terminal
For a visible 5250 error 0016 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
Why does the minus key lock my keyboard on an IBM i screen?
Your emulator probably sends Field- for the keypad minus key. Field- is meant for signed numeric fields, so in a text field the display station refuses it with 0016. Use the main keyboard hyphen instead.
What is the difference between Field- and a minus sign?
A minus sign is a character typed into the field, and only some numeric fields accept it. Field- is a key that leaves the field and marks the number as negative.
What does 0026 mean?
0026 means you pressed Field- in a numeric-only field whose last position wasn't a digit 0 to 9. Correct that position, or leave the field with Field+ or Field Exit.