Use the server subcommand RCMD to run iSeries™ control language (CL) commands on the FTP server system. The length of the RCMD subcommand string is up to 1000 characters. Because no prompting is available for the RCMD subcommand, the RCMD subcommand string must include all necessary parameters to run the CL command.
If the CL command called through the RCMD subcommand runs successfully, a message stating that the subcommand is successful is displayed. If an error occurrs, it displays a message that states there was an error. The message does not include what the error was unless the error occurred because a library, file, or member name was not valid.
This is an example of using RCMD to run a Delete File (DLTF) command:
QUOte RCMD DLTF FILE(mylib/myfile)
mylib is the name of the library from which the file is to be deleted. myfile is the name of the file to be deleted.
You might also be interested in reading about the REXEC server, which provides an alternative method for executing CL commands on a remote system.