×

Good News Everybody!

The new search engine is LIVE!

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



  • Subject: rec level i/o to QTEMP
  • From: "Alex Garrison" <agarrison@xxxxxxxxxxx>
  • Date: Wed, 12 Apr 2000 19:38:46 -0700

I remember there was some discussion several weeks ago about problems with rec level i/o to QTEMP.  Would someone mind reposting the solution to the problem?
 
Problem:  The rec level i/o classes like KeyedFile or AS400FileRecordDescription dont seem to see files in QTEMP.  I know the files exist in QTEMP because I have just done a CPYF to QTEMP using CommandCall.  As a diagnostic I also did a DSPFD OUTPUT(*PRINT) on the file in QTEMP again using CommandCall.  The spool file clearly shows the file is in QTEMP.  When I try to do a AS400FileRecordDescription.retrieveRecordFormat or KeyedFile.open on the file, the as/400 insists on telling me that the file doesnt exist in QTEMP.
 
BTW:  I do make absolutely sure that I am using the same AS400 object connection for the whole process.  Also I am using the latest mod2 toolbox.  The as/400 is at v4r4 with fairly recent ptfs.
 
 
Here is a little code snippet that fails with a "CPF3012 File STATUS in library QTEMP not found." when retrieving the record format:
 
 AS400 host = null;
 host = new AS400("MYSYS","MYUSRPRF","MYPASSWORD");
 host.connectService(AS400.COMMAND);
 host.connectService(AS400.RECORDACCESS);
 CommandCall cmd = new CommandCall(host);
 System.out.println("running command");
 cmd.run("CPYF FROMFILE(MYLIB/STATUS) TOFILE(QTEMP/STATUS) CRTFILE(*YES)");
 cmd.run("DSPFD QTEMP/STATUS OUTPUT(*PRINT)");
 QSYSObjectPathName filepath = new QSYSObjectPathName("QTEMP","STATUS","*FILE","MBR");
 KeyedFile file = new KeyedFile(host,filepath.getPath());
 AS400FileRecordDescription recdesc = new AS400FileRecordDescription(host,filepath.getPath());
 System.out.println("getting record format");
 RecordFormat[] recfmt = recdesc.retrieveRecordFormat();
 
Sorry to ask for the repost, but this problem is quite frustrating.
 
Alex Garrison
 

This thread ...


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.