Parsing IBM 3270 data in Java
I'd like to know if anyone has experience in retrieving data using 3270 protocol So far, my understanding is:
connect
I need to use telnet to connect to the SNA server, issue a command, and then return some data I'm not sure how this connection is established because I've read that standard telnet connections don't work I also read that IBM has a library that can help, but I can't find more information about it
analysis
I assume that the returned data is a 1920 character string, because the 3278 screen is 80 × 24 characters I just need to parse these characters into the appropriate fields The more I read about 3270 protocol, the less the situation seems to be - I read the character 'a' before the attribute is marked as an attribute in the protocol in the document provided in the jagacy3270 Java library experiment. My understanding is that there are more characters indicating other factors, such as whether the field is editable
I have reason to believe that my idea is too simple For example, consider a screen containing a list of items - press a special key on one of the 24 visible rows to drill down for more details about that row
It was also suggested that I could issue a print command This has some positive effects - if the format of the returned string is not 1920, because it contains these characters, for example, 'a' indicates how the user interacts with the terminal, printing will eliminate these characters In addition, it will no longer need to read a lot of data On the other hand, I don't know how to retrieve data from the print command back to Java
So
I can't access the SNA server at present, but there are some screenshots showing what the terminal will look like after getting connected, so I will start parsing I'm sorry to have so many assumptions, not so many ideas about what the data looks like Does anyone know that these systems may help me get back on track?
Solution
You picked a problem Ripper there 3270 is indeed a very complex protocol I'm not going to try to implement it. It's a stupid job. I'm talking about a painful personal experience Try to find TN3270 (telnet 3270) client API