CICS abend

ABMB: BMS cursor position past the screen

An ABMB abend means a BMS output request asked for a cursor position past the end of the screen. The CURSOR value is larger than the number of positions on the 3270 screen BMS is building output for.

Other names for this code

Also written as ABMB abend, CICS ABMB, abend ABMB, BMS ABMB, ABMB cursor position.

What it means

A 3270 screen is a grid of character positions, numbered from 0 at the top left. A 24 by 80 screen has 1,920 positions, numbered 0 to 1,919. Larger models have more. A 32 by 80 screen has 2,560, a 43 by 80 screen has 3,440, and a 27 by 132 screen has 3,564.

A program can place the cursor by number, with the CURSOR option on SEND MAP, SEND TEXT or SEND CONTROL. BMS checks that number against the size of the screen it is building. If the number is too big, CICS ends the transaction with ABMB and takes a transaction dump.

The size BMS uses is the screen size in use for this transaction, not the largest size the device supports. A terminal can have a default size and an alternate size, and the SCRNSIZE attribute of the transaction's profile decides which one applies.

Common causes

  • The program was written for a larger screen than the one in use. A cursor position of 2,000 works on a 32 by 80 screen and fails on a 24 by 80 one.
  • The program expects the alternate screen size, but the transaction's profile uses the default size, so BMS builds a 24 by 80 screen.
  • The terminal or emulator session is set up as a different 3270 model from the one the program was tested on. A session defined as model 2 has 24 rows however large the window is.
  • A position worked out from a row and a column came out wrong, for example by counting rows from 1 instead of 0 or by using the wrong line width.
  • A message sent with ROUTE can go to terminals of different sizes. A cursor position that suits the larger ones can be too big for a smaller one.

How to find the problem

  1. The region's message log shows the transaction and program with abend ABMB. Use the trace or the transaction dump to find the BMS request that failed.
  2. CEDF shows the CURSOR value on the SEND command before CICS runs it.
  3. In the program, EXEC CICS ASSIGN SCRNHT and SCRNWD return the rows and columns in use for the task. Compare them with the position the program asked for.
  4. Check the transaction's PROFILE for SCRNSIZE, and the terminal's TYPETERM for DEFSCREEN and ALTSCREEN.
  5. Check how the user's emulator session is set up. The terminal model it uses when it connects decides which definition, and so which screen sizes, the terminal gets.

How to fix it

  • Keep cursor positions within the smallest screen the program can run on, if it runs on more than one 3270 model.
  • Better still, work out the position at run time from SCRNHT and SCRNWD, or use symbolic cursor positioning. Move -1 to the length field of the field you want and code CURSOR with no value on SEND MAP, and BMS works out the position itself.
  • If the program needs the alternate screen size, define the transaction's profile with SCRNSIZE(ALTERNATE).
  • If the terminal is smaller than the program needs, fix the terminal side, such as the emulator's model setting or the TYPETERM.
  • For routed messages, check the route list and keep the cursor within the smallest terminal on it.

IBM documentation

IBM documentation: ABMB. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Why does ABMB happen for some users and not others?

Their terminals or emulator sessions use different screen sizes. The users who get ABMB have a smaller screen than the program assumes.

How do I turn a row and column into a cursor position?

Multiply the row number minus one by the screen width, then add the column number minus one. Row 24, column 1 on an 80-column screen is position 1,840.