Terminal screen error

X PROG 761: Invalid partition ID

X PROG 761 means the host sent a Write Structured Field command with a partition identifier the terminal doesn't accept. The partition named doesn't exist on the terminal, or the ID isn't valid for that structured field.

Other names for this code

Also written as PROG 761, PROG761, X PROG 761, 3270 PROG 761, program check 761, PROG 761 partition, invalid partition ID 3270.

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.

Many structured fields name a partition. A partition is an area of the screen with its own buffer. Every 3270 session has the implicit partition, ID 0, which is the whole screen and is what nearly all applications use. Some terminals also support explicit partitions, which the host creates with the Create Partition structured field and then addresses by their own IDs. A special ID of X'FF' is used with Read Partition to query the terminal rather than read a partition.

If a structured field names a partition that hasn't been created, or uses an ID that isn't allowed for that kind of field, the terminal can't act on it. It shows X PROG 761 and locks the keyboard.

Many emulators support only the implicit partition. An application that relies on explicit partitions will fail on them unless it checks first.

Common causes

  • The application writes to an explicit partition that it never created in this session, for example after a reconnect that reset the terminal.
  • The application uses explicit partitions, but the emulator supports only the implicit partition.
  • A structured field uses X'FF' where a real partition is required, or a real ID where X'FF' is required.
  • A program building structured fields put the wrong byte in the partition ID position because of an offset error.

How to find the problem

  1. Take a data stream trace and find the WSF command. For each structured field that names a partition, read the partition ID. In most of them it is the byte right after the structured field ID.
  2. Check whether a Create Partition structured field for that ID appears earlier in the same session.
  3. Check the terminal's Query Reply. It shows whether the terminal supports explicit partitions.
  4. If the error started after a reconnect or a Clear, check whether the application recreates its partitions in that case.

How to fix it

  • For the user, press Reset and Clear and start the function again.
  • Programmers should send Read Partition Query at the start, use explicit partitions only if the reply supports them, and use partition 0 otherwise.
  • Create each partition before writing to it, and create it again after anything that resets the terminal.
  • Use X'FF' only with Read Partition queries, and real partition IDs everywhere else.
  • Correct the offsets in code that builds structured fields by hand.

Read this error in WND Terminal

For a visible X PROG 761 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 a partition on a 3270 terminal?

A separate area of the screen with its own buffer. Every session has partition 0, the whole screen, and some terminals also support explicit partitions created by the host.

Why do most applications never get PROG 761?

They use only the implicit partition and never name any other. PROG 761 shows up in software that uses explicit partitions or builds structured fields by hand.

Can an emulator setting fix PROG 761?

Only if the emulator has an option for explicit partitions. Many don't, so the application has to fall back to partition 0.