473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

AS400 IO exception

1
Hi I'm trying to read all the CL (sources file ) from an AS400 machine.I'm working on the windows xp platform tried to open the file with java on the followinfg code.


public static void main(String[] args)
{
String sourceName = "/OTOL/YSREEL";
IFSFileInputStream source = null;
AS400 system = new AS400("M320","myuserid","mypassword");

try
{
system.connectService(AS400.FILE);
System.out.println(system.getVersion());
}
catch (Exception e)
{
System.out.println("Error: " + e);


}



try
{

source = new IFSFileInputStream(system,
sourceName,
IFSFileInputStream.SHARE_NONE);





int available = source.available();
IFSKey key = source.lock(8);
byte[] data = new byte[8];
int bytesRead = source.read(data, 0, 8);
System.out.println(bytesRead);


}
catch (Exception e)
{

System.out.println("Error: " + e);



}


}

OTOL is an library and YSREEL is and CL source file.

I can connect the machine but it give me the folowwing exception there :

Error: java.io.FileNotFoundException: /OTOL/YSREEL

can anyone help me?
Jul 25 '06 #1
0 1275

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: fn | last post by:
Can anyone help me understand what it takes to define a Linked Server connection to an IBM eSeries (AS400)? Do I need Microsoft's SNA Server or some other product or can I simply do it with the...
2
by: Niyazi | last post by:
Hi, I have to retrieve a data from AS400 DB2 and after working with data I have to export into one of existing Excel file. I can connect into specific library in AS400 DB2 using AS400...
0
by: alan_sec | last post by:
Hi. Does the com.ibm.as400.access.AS400JDBCDriver driver that is part of JTOpen (http://jt400.sourceforge.net) works with db2 udb version 7 that is installed on windows 2000? I' m trying to...
13
by: Sehboo | last post by:
Hello, we have data sitting on AS400 (V4R5M0) - DB2-400. I need to access that from my vb.net application. I don't know anything about AS400. Is it possible to get data from tables and stored...
0
by: John | last post by:
We are doing integration with an AS400 running websphere - webservices. When the customer (AS400) calls the .Net webservice the customers java code (every other request or so) throws the following...
6
by: mperkins | last post by:
Hello. I have a curious problem. Occasionally executing a simple select against an AS400 DB2 database through JDBC fails with the following error: (SQLState = 57014) - java.sql.SQLException: ...
1
by: Iain | last post by:
Hi All I am creating a database trigger to write details real time from tables on one AS400 to another over our WAN. Is there such a concept as ODBC connections on the AS400 to perform this...
1
by: accyboy1981 | last post by:
Hi, I'm new to AS400 and am trying to copy the contents of a table from an SQL Server 2000 table to a table in AS400, I'm doing this using DTS. I'm connecting using the iSeries Access ODBC...
1
by: rabidbunny23 | last post by:
I am trying to connect to an AS400 database from C# code and cannot find what I am doing wrong. This is the error that I get (thrown by the conn.Open()): "Non-NULL controlling IUnknown was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.