RNMOBJ (Rename Object) command
The Rename Object (RNMOBJ) command can be used to rename a remote file.
The following items should be considered when using the SYSTEM parameter values:
- When you specify *LCL, local objects are renamed. This might include DDM files.
- When you specify *RMT, this value applies only to OBJTYPE(*FILE). The DDM file containing the remote file to be renamed is specified on the OBJ parameter.
The DDM file containing the new name for the remote file is specified on the NEWOBJ parameter. Both DDM files must already exist in the same library (on the source server). The two DDM files must refer to the same target servers and contain the same remote location information. Neither the two local DDM files nor the RMTFILE names in the two DDM files are changed. Specify *LCL to rename the DDM file or use the Change DDM File (CHGDDMF) command to change the RMTFILE name in a DDM file.
- When you specify *FILETYPE, this value applies only to OBJTYPE(*FILE). If the file specified in the OBJ parameter is a DDM file, the rules when specifying *RMT apply. If the file is not a DDM file, the rules when specifying *LCL apply.
When renaming remote files for iSeries™ and System/38™ targets, if library names have been specified in the RMTFILE parameter for the two DDM files, the library names must be the same but the file names must be different.
Parent topic:
DDM-related CL command considerations