RCMD (Send a CL Command to an FTP Server System)

 

The server subcommand RCMD runs i5/OS® control language (CL) commands on the FTP server . 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.

 

FTP server subcommand

If the CL command called through the RCMD subcommand runs successfully, a message stating that the subcommand is successful is displayed. If an error occurs, 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.

Related concepts
REXEC server

Related reference
File Transfer Protocol server syntax conventions QUOTE (Send a Subcommand to an FTP Server)