SBMRMTCMD (Submit Remote Command) command
The Submit Remote Command (SBMRMTCMD) command submits a command using DDM to run on the target server.
The remote location information in the DDM file is used to determine the communications line to be used, and thus, indirectly identifies the target server that is to receive the submitted command.
You can use the SBMRMTCMD command to send commands to any of the following target servers:
- iSeries™
- System/38™
- Any server that supports the Submit System Command (SBMSYSCMD) DDM command
The SBMRMTCMD command can be used to send CL commands (and only CL) to an iSeries server or a System/38. It can also be used to send commands to target servers other than iSeries or System/38 servers if the target server supports the DDM architecture Submit System command. The command must be in the syntax of the target server. The SBMRMTCMD command cannot be used to send operation control language (OCL) commands to a System/36™ target because the System/36 server does not support the function.
The primary purpose of this command is to allow a user or program using the source server to perform file management operations and file authorization activities on files located on a target server. The user must have the proper authority for the target server objects that the command is to operate on. The following actions are examples of what can be performed on remote files using the SBMRMTCMD command:
- Create or delete device files
- Grant or revoke object authority to remote files
- Verify files or other objects
- Save or restore files or other objects
Although the command can be used to do many things with files or objects, some are not as useful as others. For example, you can use this command to display the file descriptions or field attributes of remote files, or to dump files or other objects, but the output remains at the target server. Another way to display remote file descriptions and field attributes at the source system is to use the Display File Description (DSPFD) and Display File Field Description (DSPFFD) commands. Specify the SYSTEM(*RMT) parameter and the names of the DDM files associated with the remote files. This returns the information you want directly to the local server.
A secondary purpose of this command is to allow a user to perform nonfile operations (such as creating a message queue) or to submit user-written commands to run on the target server. The CMD parameter allows you to specify a character string of up to 2000 characters that represents a command to be run on the target server.
- iSeries and System/38 target systems on the SBMRMTCMD command
The SBMRMTCMD command can submit any CL command that can run in both the batch environment and using the QCAEXEC server program.
- Restrictions for the SBMRMTCMD command
This topic describes restrictions for the SBMRMTCMD command.
- Examples: SBMRMTCMD command
The examples display different uses for the SBMRMTCMD command.
- Additional considerations: SBMRMTCMD command
This topic describes additional considerations for the SBMRMTCMD command.
Parent topic:
DDM-specific CL commands
Related concepts
Parts of DDM: DDM file
Source server actions dependent on type of target server
Related reference
Perform file management functions on remote servers
Reclaim DDM Conversations (RCLDDMCNV) command