It seems like what you want to know are details about the 5250 data stream.
5250 is a data stream that contains not only plain text data, but attributes
for the data displayed on the screen (like foreground color, background
color, underlining and bold), along with keyboard command attention (CA) and
command function (CF) keys.
I think the best source of that complete information is specified in a set
of books by IBM, like "SNA Formats", and others related to the SNA data
streams used in 5250-like terminals.
There is an on-line source of information where you will probably find it.
I'd suggest you search the IBM search engine at this URL. You will have to
look for further to find what you need. Try to find out one version that
deals with iSeries under the same bookmanager library reader.
http://www-03.ibm.com/systems/z/os/zos/library/softcopy/softfeat.html
Good luck!
X Sanchez
-----Mensaje original-----
De: linux5250-bounces@xxxxxxxxxxxx [mailto:linux5250-bounces@xxxxxxxxxxxx]
En nombre de Richard Nolde
Enviado el: Jueves, 15 de Julio de 2010 04:47 p.m.
Para: linux5250@xxxxxxxxxxxx
Asunto: [LINUX5250] Driving TN5250 non-interactively
TN5250 list members:
I've been tasked with writing an interface between an application that
runs on a remote iSeries host, accessible with TN5250 over a private
network, and our application that would query the iSeries in real time
without human interaction. My application will run on a Linux or AIX
box, and act like a broker between the local application and the remote
iSeries host application that contains the database we are querying.
I've been studying the current TN5250 source code to get a feel for what
I'm up against and clearly this is no simple task. Can anyone recommend
one or more books/online sources about how the TN5250 interface on
iSeries works. eg format fields, data types, etc. I can generate the
requests manually with TN5250 and get the desired results back as a
spool file with lp5250d, so my main objective is how to replace the
curses interface with one that reads from a file or other
non-interactive source. Eventually, I will provide a daemon that handles
requests from multiple clients over a socket interface and serializes
them for submission to the iSeries host, but that isn't necessary for now.
From what I've read and seen by playing with the remote application, I
will need to know the position, length, and data types for each field of
each screen that I wish to use, and Action or Function Key definitions
for each screen. Assuming I can build a map that identifies each
component of each screen, and the sequence of screens that will be
encountered, I would then load each field with the appropriate value and
call one of the TN5250 functions to send the data on the stream to the
remote host application. If the application screen produces output, I
may or may not chose to parse it directly if I can get everything I want
from the print spool that is returned via lp5250d. In the sample cases
that I have looked at, the screen output simulates bold printing by
issuing a carriage return and then resending the data for selected
fields a second time, as might have been done with ancient line printers
of yore. I can probably parse this out but it would be nice to be able
to disable this altogether. I'm currently not using a Host Print
Transform on the print spool output, only scs2ascii as there are no
graphics involved. The returned data is in a format that I should be
able to parse on my end as long as I know the parameters that were used
to generate the query and the screen from which the output is derived.
I note that the TN5250 application can be compiled without ncurses
support, but doing so produced an executable that will not interact with
the remote host. I assume that this is due to the field position
requirements of the remote application.
My initial approach is to build a profile of all the function calls in
the tn5250 interactive application and see which ones call functions
from the ncurses library. Once I understand how/where the screen
co-ordinates are being set/read, I may be able to write a function that
will read the appropriate values from my template files and the input
data stream.
Any ideas/suggestions and online documentation references would be
welcome. I have no access to the iSeries host except through the remote
application. My servers run Linux or AIX 5.3.
Thanks,
Richard Nolde
As an Amazon Associate we earn from qualifying purchases.