Reading a file on the mainframe from a web-server

Discussions

Web tier: servlets, JSP, Web frameworks: Reading a file on the mainframe from a web-server

  1. I currently have a JSP page that can access plain text files on another unix box. Those text files were FTP'd from the mainframe. What I want to do is read the file (dataset) directly from the mainframe and cut-out the FTP'ing to a unix box. I am currently reading the text file using the URL function with the BufferedReader function. However, this does not work with the mainframe file (I think). Can someone help me out?
  2.    If the mainframe has an ftp server or a webserver, you should be able to access it easily.

       You could also implmement simple java app. on the mainframe, that will listen to a particular port and feed off the local file to requests on that port (assuming the mainframe has a JVM). You could continue to use a URL connection and call the mainframe directly on that port.

    hope this helps.

    Floyd
  3. There are a few ways for you to get to your data on the mainframe. CICS (Transaction server 1.3) now has a CORBA interface where java code can run in CICS regions (via a high performance compile to loadlib) and access CICS resources via JCICS classes. This enables accessing VSAM, linking to COBOL programs, etc. So if your file is VSAM, this would be the way to go. The other way is via DB2CONNECT to DB2 on the mainframe. This would be good if your data was in DB2 on the mainframe. These 2 solutions are for enterprise type applications (Batch, CICS, web) where the data is not stored on flat files, but on keyed files (VSAM, DB2). For flat files, possibly the file could be moved to the UNIX file system on the mainframe (UNIX System Services) and accessed via Websphere webserver running on the mainframe.
  4. Hi ,
    I am doing almost similar stuff now, I am trying to read some files from Legacy system.
    generate an XML from this file and dump into Database.

    Can you please send me the working source code for File Read/Write.

    my email id: shiv_sreek at emeraldsolutions dot com

    Thanks,
    Shiv