Previous Topic: ADDRESS HWS Command FormatNext Topic: HWS GETATTR— Get the value of a system attribute


HWS SENDCMD—Sends command to HiSrv

The ADDRESS HWS SENDCMD command lets you execute a specific hardware command for a specific target.

This command has the following format:

ADDRESS HWS “SENDCMD keywords
/* required keywords */
{CMDTEXT(full command)} 
{ENTITY(list of entities)}
/* optional keywords */
[DEBUG(YES|NO)]
[TIMEOUT(value)]
CMDTEXT

Contains the full text command that you want to execute through HiSrv. Commands are formatted for the Hardware Interface Service. A complete list of commands and their functions is available in CA Common Services for Z/OS Reference GuideHardware .

COMMON KEYWORDS

ENTITY, DEBUG and TIMEOUT are keywords common across every HWS command, and are defined in section ADDRESS HWS Common Keyword.

Examples: HWS Connect

This example sends a command to deactivate LPAR SAMPLE1, because SAMPLE1 is not a unique LPAR name the CPC must be specified. In this case IBM.MACHINE.SAMPLE:

ADDRESS HWS "SENDCMD CMDTEXT(‘DEACTIVATE FORCE=YES’) ENTITY(LPAR(‘SAMPLE1’) CPC(‘IBM..MACHINE.SAMPLE’))"

This example executes the operating system command: command on LPAR SAMPLE2, which is uniquely named in the topology. It also prints debugging messages:

ADDRESS HWS "SENDCMD CMDTEXT(‘OSCMD PRIORITY=HIGH COMMAND=command’)
ENTITY(LPAR(‘SAMPLE2’)) (DEBUG(YES)"
Return information from SENDCMD

The REXX variables HWSRC and HWSRS contain the address environment return and reason codes respectively. When a hardware command is executed, a hardware event notification is created. Validation and/or error reporting must be done by catching these events, see Hardware Event API Rules in CA OPS/MVS AOF Rules User Guide.