Can you use a web service instead?

If the reports to be transfered are easy to build, you can generate a web page and retrieve it automaticlay.
If you need the output of a "batch" program, you can run it from a web page (automaticaly, by using something like wget) and retrive the spoll file after.

Richard Nolde wrote:

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



This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].