0

we use

.........
.....
put "C:\Users\rahulsri\Desktop\backup\Zerty\test.CBL" /QSYS.LIB/XYZ.LIB/QSRC.FILE/test.MBR
quote RCMD CHGPFM FILE(XYZ/QSRC) MBR(test) SRCTYPE(CBL) TEXT('test')
.........

for file uploading, here SRCTYPE(CBL) is for specifying the source type which i also want to specify at my java Code by using FtpClient class so what are the method to set the source type here, or other mean how can we set it.

RTA
  • 1,251
  • 2
  • 14
  • 33

1 Answers1

1

You can use the sendCommand method to send arbitrary commands to the remote server.

client.sendCommand("RCMD CHGPFM FILE(XYZ/QSRC) MBR(test) SRCTYPE(CBL) TEXT('test')");

From the documentation:

Sends an FTP command with no arguments to the server, waits for a reply and returns the numerical response code. After invocation, for more detailed information, the actual reply text can be accessed by calling getReplyString or getReplyStrings.

Joni
  • 108,737
  • 14
  • 143
  • 193
  • can you hint out me for deleting the whole directory's file and directory as well? i am new in this. – RTA Mar 26 '13 at 05:25
  • FTP servers typically don't have a "recursive delete" command. You have to descend into the subdirectories and delete the files one by one before you can delete the subdirectory. See also http://stackoverflow.com/questions/1931894/ftp-protocol-and-deleting-directories – Joni Mar 26 '13 at 06:44