|
On Mon, Jul 09, 2001 at 08:19:33AM -0700, tushar m wrote: > > i have just started working on tn5250 code and do > not have a very clear understanding of it right > now.Actually what i need is that i have to connect to > an AS400 and get the screen data from there..and and > probably write back to the same.i don't need any > > emulation for my work but just need to pick up the > data read from the as400 screen and pass it to some > other application which will format it. > > Now from what i understand ,the code connects to the > as400 and after handling the telnet options and all it > wites data to some display buffer before showing it to > the user screen(emulation ). > > i'm stillnot able to comprehend how the actual > screen data is being stored ( is it stored just line > by line ???)) and what is this format field ?? > > from what i understand i need to pick up the data > from the display buffer . That is correct. There is a display (Tn5250Display) and a display buffer (Tn5250DBuffer). The current display buffer is what you are interested in. The screen is stored in a two-dimensional array of bytes. Each byte is either an EBCDIC character to display or a 5250 attribute. Simply, imagine scanning left-to-right, top-to-bottom. If the character is an attribute set the "current" attributes and display a space. If the character is not an attribute, display it as an EBCDIC character using the current attribute. See cursesterm.c or slangterm.c - it should be pretty obvious from there. > > cud anyone explain how this thing actually works and > where should i take the data i require. > > also the part of format fields and field informtion > that is stored is not very clear to me.How do i remove > these curses dependencies from the code as i have to > port this app on the as400 itself!!!!!!!!!!! To remove the curses dependencies, just don't try to compile cursesterm.c. You will need to either implement a new terminal type or hack the code to work if no terminal "object" is present (make sure everything checks to see if the terminal ptr is NULL). You'll have to change or delete the few lines in tn5250.c where the terminal "object" is constructed and set up. If you want to implement a new terminal type on the AS/400, you might be able to use the stuff in wtd.c to re-compose a 5250 stream from the data in the display buffer and send it to the terminal. In effect, re-implementing passthrough. I'm not sure how you'd move data from the AS/400 fields (physical terminal input) to the display buffer (which becomes the emulated terminal output, or the remote terminal's input), but it doesn't seem impossible. > those are a lot of questions but i hope u'll > answer my queries and help me out.!! Sure. I'll trade support for code any day ;-) > > > > thanking you. > > tushar mutatkar > > (india--bangalore) > Good luck. +--- | This is the LINUX5250 Mailing List! | To submit a new message, send your mail to LINUX5250@midrange.com. | To subscribe to this list send email to LINUX5250-SUB@midrange.com. | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.