MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » February 2008

CPF3012 Error when trying to retrieve RecordFormat



fixed

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





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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