The ONLYIF command allows a single command or group of commands contained within a BEGIN ... END block, immediately following the ONLYIF command, to be run conditionally depending on the host specified. An ONLYIF command cannot follow another ONLYIF command and it cannot be nested within a BEGIN ... END block.
ONLYIF HSMHOST(hostID1)
/* The following command is issued on all hosts. */
command1
ONLYIF HSMHOST(hostID1)
/* The following command is issued on hostID1 only. */ +
command1
ONLYIF HSMHOST(hostID1,hostID2)
BEGIN
/* The following commands are issued for hostID1 and hostID2 only. */
command1
command2
END
For more information about the commands you can specify in the DFSMShsm SYS1.PARMLIB member ARCCMDxx, see z/OS DFSMShsm Implementation and Customization Guide.