× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey everyone,

I've been working on the enhanced 5250 protocol support and I have run into a mystery. So I'm trying to find someone who understands either the 5250 protocol or at least the reference manual better than me. Let me explain my problem and then all you wizards can answer.

The section on DEFINE SELECTION FIELD structured field in the reference manual is located at:

http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/CO2E2001/15.6.13.5?DT=19950629163252

Table 59 describes the format for the define selection field major structure. I understand everything down to byte 20, but at byte 21 I am getting data from the AS/400 that doesn't correspond to anything listed. By studying the trace I was able to determine that the first byte of this unknown data is a length, but the rest eludes me. It is not a minor structure as far as I can tell because the byte following the length is not 0x10. I do get several minor structures later. This unknown data sits between the end of the major structure and the start of the first minor structure. Here is a trace (I hope my logging is descriptive enough that you can tell which parts of the major and minor structure have been read and recognized):

Entering tn5250_session_define_selection_field()
Use this selection field in all cases
Selection field is auto-enter on selection except if single-digit or double-digit numeric selection is used
Field advance = character advance
Menu bar
textsize = 0x08 (8)
rows = 0x01 (1)
choices = 0x05 (5)
padding = 0x01 (1)
separator = 0x00
selectionchar = 0x00
cancelaid = 0x00
length of unknown data = 0x13
unknown data = 0x01 (1)
unknown data = 0xE0 (224)
unknown data = 0x00 (0)
unknown data = 0x21 (33)
unknown data = 0x00 (0)
unknown data = 0x23 (35)
unknown data = 0x00 (0)
unknown data = 0x23 (35)
unknown data = 0x22 (34)
unknown data = 0x20 (32)
unknown data = 0x20 (32)
unknown data = 0x22 (34)
unknown data = 0x20 (32)
unknown data = 0x22 (34)
unknown data = 0x00 (0)
unknown data = 0x20 (32)
unknown data = 0x00 (0)
unknown data = 0x22 (34)
byte = 0x0E (14)
byte = 0x10 (16)
Entering tn5250_session_define_selection_item()
Available and not a default selection
mnemonic offset is included
Numeric selection characters are not included in this minor structure
Minor structure ignored
ignored = 0x00
ignored = 0xC4
ignored = 0x81
ignored = 0xA3
ignored = 0x81
ignored = 0x82
ignored = 0x81
ignored = 0xA2
ignored = 0x85
byte = 0x0B (11)
byte = 0x10 (16)
Entering tn5250_session_define_selection_item()
...


Each time tn5250_session_define_selection_item() is called we have received another minor structure. Anyone have any idea what the "unknown data" is?

Also, the docs say that if the first three bits of flagbyte3 in the minor structure are all off then the minor structure is ignored. In my case those bits are always off, so it always ignores the choice text. Then how do I know what text to use?

btw - the screen I'm working with comes from Martin Rowe's excellent DBG400 utilities. Anyone who wants to use the same screens for testing can download them from dbg400.net.

James Rich

It's not the software that's free; it's you.
        - billyskank on Groklaw

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.