× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi
Yes it does print, File exist, but the program fails
at line below
RecordFormat[] format =
recordDescription.retrieveRecordFormat();

Ashish
--- Luis Colorado <LuisC@xxxxxxxxxxxxxxxx> wrote:

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





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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.