Terminal screen error

X PROG 758: Invalid mode in Set Reply Mode

X PROG 758 means the host sent a Set Reply Mode structured field that asked for a reply mode the terminal doesn't accept. The terminal rejected the Write Structured Field command and locked the keyboard.

Other names for this code

Also written as PROG 758, PROG758, X PROG 758, 3270 PROG 758, program check 758, Set Reply Mode error, PROG 758 invalid mode.

What it means

Write Structured Field (WSF) is the 3270 command for anything more complex than painting a screen. Behind the command comes one or more structured fields. Each one starts with a two-byte length, then an ID that says what kind of field it is, then its data. Common outbound structured fields include Read Partition (used to query the terminal), Erase/Reset, Set Reply Mode, Load Programmed Symbols and Outbound 3270DS, which carries an ordinary screen write inside a structured field.

Set Reply Mode controls how the terminal formats what it sends back when the host reads the screen. There are three modes. Field mode, the default, reports fields with their basic attributes only. Extended field mode also reports each field's extended attributes, such as color and highlighting. Character mode also reports attributes set on single characters, for the attribute types the host lists in the same structured field.

The structured field names a partition, then a mode byte, and in character mode a list of attribute types. If the mode byte isn't one of the defined modes, or asks for something the terminal can't do, the terminal rejects the command. It shows X PROG 758 and locks the keyboard.

Most applications never change the reply mode, so this code is rare. When it appears, it points to an application or product that uses Set Reply Mode on purpose.

Common causes

  • The mode byte holds a value other than the three defined modes, often because the program built the structured field with the wrong offsets.
  • The application asked for character mode or extended field mode on a terminal that doesn't support it.
  • The structured field names a partition and mode combination the terminal can't apply.
  • The application assumes support it never checked in the Query Reply.

How to find the problem

  1. Note the application and function. Set Reply Mode is used by software that needs to read back colors, highlighting or character attributes from the screen.
  2. Take a data stream trace and find the Set Reply Mode structured field (ID X'09') inside the WSF command. Read the partition byte, the mode byte and any attribute type list after it.
  3. Field mode is X'00', extended field mode is X'01' and character mode is X'02'. Any other value explains the error by itself.
  4. Check the terminal's Query Reply to see whether it supports the mode the application asked for.

How to fix it

  • For the user, press Reset and Clear, then retry. Report it with the application name if it repeats.
  • Correct the mode byte or the offsets in the code that builds the structured field.
  • Query the terminal at the start of the session and fall back to field mode when the terminal doesn't support the other modes.
  • If the data stream is valid and the terminal claims support, take the trace to the emulator vendor.

Read this error in WND Terminal

For a visible X PROG 758 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 is reply mode on a 3270?

It decides how the terminal formats data it sends back to the host on a read. Field mode is the default, and extended field and character modes add attribute information.

Is PROG 758 common?

No. Most applications never send Set Reply Mode, so it usually points to one specific product or hand-built data stream.

Does PROG 758 lose my input?

The write that contained Set Reply Mode was rejected. Press Reset and Clear and start the function again.