PUT Remote Command (PUTRMTCMD) command:

The command that allows an AS/400 command to be executed on a remote machine using FTP (File Transfer Protocol) is called PUTRMTCMD.

The job runs either interactively or can be submitted to batch using the SBMJOB command. The command string that you send to the remote AS/400 behaves as if run in batch, because of the way FTP works on the AS/400. It is very similar to the PUTRMTF or GETRMTF commands.

FTP works kind of like RJE (Remote Job Entry) when connecting to a mainframe system. The commands issued using FTP are batch in nature and no interactive feedback from the commands are sent to the requester. For example, if you were to try to start PDM (STRPDM) which brings up a menu, it would simply return the following:

550-Error occurred on command STRPDM
550 Error found on STRPDM command..
Enter an FTP subcommand.

Only commands that can be run in batch (normally) will be supported by FTP.

This command looks like the following:

                         PUT Remote Command (PUTRMTCMD)

 Type choices, press Enter.

 Remote user profile  . . . . . .                 Name, *CURRENT
 Remote user password . . . . . .                 Character value
 Remote system  . . . . . . . . .   ____________________________________________
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________
 Command to execute . . . . . . .   ____________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
____________________________________________________________________
 Submit job to batch  . . . . . .   *YES          *YES, *NO
 Job description  . . . . . . . .   *USRPRF       Name, *USRPRF
   Library  . . . . . . . . . . .     __________  Name, *LIBL, *CURLIB

                                                                         Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F10=Additional parameters   F12=Cancel
 F13=How to use this display        F24=More keys

The job description and library only appear if the answer to the submit job to batch entry is "*YES". It will appear if you press Enter or F10.

If F10 and the Page Down key are pressed, the following screen is shown. This allows the entry of a command string that is not validated (and also not promptable) in the event the command itself does not exist on the source machine. Only one of either the CMD or the RQSDTA parameters can be used, and one of them must be entered.

This looks like the following:


                         PUT Remote Command (PUTRMTCMD)

 Type choices, press Enter.

                            Additional Parameters

 Request data or command  . . . . RQSDTA         *CMD___________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
_ ...

                                                                         Bottom
 F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display
 F24=More keys

NOTE: Remember that commands that require interactive intervention will not be supported and display commands (i.e. DSPSYSSTS) will actually be printed and not displayed.