Terminal screen error

5250 error 0019: Dup or Field Mark key not allowed in field

5250 error 0019 means you pressed the Dup key, or the Field Mark key, in a field where the program hasn't allowed it. Dup asks the program to repeat the value from the previous record, and only fields set up for it accept the key.

Other names for this code

Also written as 0019, error 0019, 5250 0019, operator error 0019, dup key not allowed, duplicate key or field mark key not allowed in field, AS/400 error 0019.

What it means

The Dup key comes from high-volume data entry. An operator keying a stack of forms presses Dup in a field to say the value is the same as on the last record, instead of typing it again. The display station fills the field from the cursor to the end with a special duplication character, hex 1C, and sends the screen as usual. IBM's DDS reference is clear that the program does the actual copying. The display station only marks the field.

A field takes Dup only if the display file allows it, with the DUP keyword on that field. Press Dup anywhere else and the display station refuses the key, locks the keyboard and shows 0019. The same code covers the Field Mark key on keyboards that have one.

Few people press Dup on purpose today. On a PC the key is usually mapped to a key combination in the emulator, and 0019 often means that combination was pressed by accident.

Common causes

  • You pressed Dup expecting the field to repeat its last value, but the program allows Dup only on some fields, and this isn't one of them.
  • You pressed the key or combination your emulator maps to Dup or Field Mark without meaning to.
  • The DUP keyword on the field is conditioned by an option indicator, and the program left that indicator off for this screen.

How to find the problem

  1. Check what key you pressed. Your emulator's keyboard map shows which key sends Dup and which sends Field Mark.
  2. Press Help while 0019 is on the error line to see the system's text for the error.
  3. In the display file source, look for DUP on the fields where Dup should work. A response indicator in the keyword, such as DUP(16), tells the program that Dup was pressed.

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 the value in full.
  • If you pressed Dup by accident, check the keyboard map and move Dup to a key you are less likely to hit.
  • For programmers, to allow Dup on a field, add the DUP keyword with a response indicator and recreate the display file with CRTDSPF. Then write the code that copies the previous value when the indicator is on. IBM's DDS example keeps the last value in a hidden field for this.
  • For programmers, validate duplicated values in the program. IBM's reference says CHECK, COMP, RANGE and VALUES have no effect when Dup was pressed. For a numeric field, the hex 1C characters aren't returned to the program, so test the indicator rather than the field value.

Read this error in WND Terminal

For a visible 5250 error 0019 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 the Dup key do on an IBM i screen?

It marks the field as a copy of the same field on the previous record. The program sees that Dup was pressed and fills in the earlier value itself.

Why does the field show odd symbols after I press Dup?

The display station fills the rest of the field with the duplication character to show it was duped. The program replaces it with the real value after you press Enter.

Can I turn Dup on for a field myself?

No. Dup is enabled by the DUP keyword in the display file, so the programmer has to add it and handle the copy in the program.