×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Ashish,

When you run this program, does it print the message saying "File exist"?


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ashish Kulkarni
Sent: Monday, February 11, 2008 4:23 PM
To: java400-l@xxxxxxxxxxxx
Subject: CPF3012 Error when trying to retrieve RecordFormat

Hi
I have following code below

AS400 as400 = new AS400();
CommandCall cmd = new CommandCall(as400);
String liblList = "QTEMP MYLIB QGPL";
String command = "CHGLIBL LIBL(" + liblList.trim() +
")";
boolean flag = cmd.run(command);
QSYSObjectPathName filePath = new
QSYSObjectPathName("%LIBL%", "MYFILE", "FILE");
ObjectDescription od = new
ObjectDescription(as400,filePath.getPath());
if(od.exists())
{
System.out.println("File exist");
}
AS400File file = new SequentialFile(as400,
filePath.getPath());
AS400FileRecordDescription recordDescription =
new AS400FileRecordDescription(as400, file.getPath());
RecordFormat[] format =
recordDescription.retrieveRecordFormat();

I am getting at the last statement in the above code,
what am i missing, the file is existing in the library
list.

com.ibm.as400.access.AS400Exception: CPF3012 File
MYFILE in library *LIBL not found.
at
com.ibm.as400.access.AS400FileRecordDescriptionImplRemote.retrieveRecordFormat(AS400FileRecordDescriptionImplRemote.java:1147)
at com.ibm.as400.access.AS400FileRecordDescription.retrieveRecordFormat(AS400FileRecordDescription.java:488)

A$HI$H


____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

This mailing list archive is Copyright 1997-2026 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.