Testing it with a server, I got an error that does not occur with other tn5250 clients I have tried. I think the error is caused by an SBA order to row 1 column 0 in the outgoing data stream used by the server. The
IBM manual seems to say that this should work.

Here's what I find in the IBM manual:

   "The row is equal to 1 and the column address is equal to 0, followed
    by an SF field starting in row 1, column 1. Any other use of 0 in row
    or column address results in a parameter error."

I've read that paragraph 5 or 6 times now, and I have no idea what it means. Is this saying that SBA always has the same parameters, 1 and 0? And that it's always followed by an SF order?

Or... what is that paragraph trying to tell me? Specifically, why would a server send an SBA with row 1, column 0? What does it do?

ALSO, despite the subject line, this error has nothing to do with Win32. If the SBA handling is wrong, it's wrong in any client using lib5250 on any platform.

Here's the relevant code in lib5250 (session.c):

static void
tn5250_session_set_buffer_address (Tn5250Session * This)
  int X, Y;
  int width;
  int height;
  unsigned long errorcode;

  Y = tn5250_record_get_byte (This->record);
  X = tn5250_record_get_byte (This->record);

  width = tn5250_display_width (This->display);
  height = tn5250_display_height (This->display);

  if (Y == 0 || Y > height || X == 0 || X > width)
      errorcode = TN5250_NR_INVALID_ROW_COL_ADDR;
      tn5250_session_send_error (This, errorcode);

We clearly don't allow X or Y to ever be 0. I hesistate to change the code without having any idea what the ramifications are. I need to understand why a host would try to set the buffer address to a coordinate that's not on the screen!

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].