|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hi all. I am relatively new to Java, so...please bear with me :) I am trying to load an IFS file, but I am running into some errors. I believe that the errors are pretty basic, but I can's seem to correct them. Here is the code: public IFSFileTest() { // Create the AS400 connection & file definitions AS400 as400 = new AS400("209.222.17.134", "GISB", "BSIG" ); IFSFile file = new IFSFile(as400, "/GISB/OUTBOUND/GSBPDTAOUT"); // Read the IFS file and change it to a Java buffered reader object IFSFileInputStream fileIn = new IFSFileInputStream(as400, "/GISB/OUTBOUND/GSBPDTAOUT"); InputStreamReader inReader = new InputStreamReader(fileIn); BufferedReader reader = new BufferedReader(inReader); // Get the data from the file String data = reader.readLine(); while (data != null) { System.out.println(data); data = reader.readLine(); } } public static void main(String[] args) { IFSFileTest iFSFileTest = new IFSFileTest(); iFSFileTest.invokedStandalone = true; } The errors I am receiving are that I must catch or declare exceptions for the following lines: IFSFileInputStream fileIn = new IFSFileInputStream(as400, "/GISB/OUTBOUND/GSBPDTAOUT"); String data = reader.readLine(); data = reader.readLine(); I understand the Try/Catch blocks, but when I use a try/catch block, there is a scooping issue with the object fileIn. Any ideas? Thanks Mike ================================ Mike Silvers AS/400 Senior Programmer/Analyst AS/400 IBM Certified RPG IV Developer AS/400 IBM Certified Solutions Expert Hainey Business Systems 8 E. Canal St Dover, PA 17315 Branch Office: (410) 397-8739 Phone: (800) 932-3380 Fax: (717) 292-9474 Web: http://www.hbs-inc.com ________________________________ Providing E-Commerce, EDI, AS/400 Development and related services nationwide. ================================ --
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.