× 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.



Nick,

Check out the "issueCommand" method of the FTP class.

If I remember this thread correctly, you're looking for way to set the
member type and description of a member after using FTP to send it to the
AS/400. If so, the remote command you would want to execute is:

        CHGPFM FILE(library/sourcefile) MBR(sourcemember) SRCTYPE(sourcetype)
TEXT(description)

To execute that command on the remote system from your Java program, you
should be able to:

        myFTPObject.issueCommand("RCMD CHGPFM FILE(library/sourcefile)
MBR(sourcemember) SRCTYPE(sourcetype) TEXT(description)");

where myFTPObject is the instance of the FTP class you used to send (via the
put method) the member in the first place.

Here is a little Java program that illustrates what I'm talking about.


/******************************************************/
import com.ibm.as400.access.*;

public class TestCommand {

  public static void main(String[] args) {
    try {
      FTP myFTP = new FTP("mysystem","myuserid","mypassword");
      myFTP.put("localfile", "library/sourcefile.member");
      myFTP.issueCommand("RCMD CHGPFM FILE(library/sourcefile) MBR(member)
SRCTYPE(newtype) TEXT(my description'");
      myFTP.disconnect();
    } catch (Exception e) {
      System.out.println("Exception: " + e);
    }
    System.exit(0);
  }
}
/******************************************************/


Hope this helps!
Richard Casey


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of Nick Leonessa
Sent: Monday, March 31, 2003 4:15 PM
To: JAVA400-L@xxxxxxxxxxxx
Subject:


First thanks for the response.

The examples at http://faq.midrange.com/ are mostly executed on the as/400.
I am looking for examples that are executed from within a java program
running from my PC using the as400ftp class.

Thanks.
Nick



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.