Previous Topic: HWS GETATTR— Get the value of a system attributeNext Topic: ADDRESS HWS Common Keywords


HWS SETATTR— Update the value of a system attribute

The ADDRESS HWS SETATTR command lets you update the value of a single attribute for a specific target.

This command has the following format:

ADDRESS HWS “SETATTR keywords” 
/* required keywords */
{ATTR(name of attr)} 
{ATTRVAL(new attr value)} 
{ENTITY(list of entities)} 
/* optional keywords */
[DEBUG(YES|NO)]
[TIMEOUT(value)]
ATTR

ATTR specifies the name of the target attribute to be updated. These names are derived from the attribute names used by BCPii.

ATTRVAL

ATTRVAL contains the value the specified attribute should be updated to. Attribute values have several different types including:

Binary

This data type is a fixed or variable length binary values, they are entered as either hex values or hex strings. For example: ATTRVAL(X’A23F4D0F’) or ATTRVAL(A43B5CFF)

Boolean

True and False values that are set using the character strings ‘TRUE’ and ‘FALSE’. For example: ATTRVAL(FALSE)

Character Strings

This data type is a fixed or variable length strings of characters and are specified in ATTRVAL as such. For example: ATTRVAL(string) or ATTRVAL(‘another string’)

Handler

A BCPii attribute type that is not supported by SETATTR.

IP Address

A BCPii attribute type that is not supported by SETATTR.

Signed Binary Number

A signed integer value in the range −2,147,483,648 through 2,147,483,647. This value requires a leading sign for negative numbers. For example: ATTRVAL(-34523) or ATTRVAL(4)

Unsigned Binary Number

A positive integer value in the range 0 through 4,294,967,295. For example: ATTRVAL(657874)

Unknown Binary Value

The data type for a BCPii attribute is undocumented or not identified. Unknown binary is not supported by SETATTR.

COMMON KEYWORDS

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

Example: HWS SETATTR

This example sets the value of the attribute CPCVERSION to 15, it also creates debugging messages:

ADDRESS HWS "SETATTR ATTR(‘CPCVERSION’) ATTRVALUE(15) ENTITY(CPC(‘SAMPLE.IBM.CPCNAME’)) DEBUG(YES)"

This example sets the value of the attribute ERRSTAT to the boolean value true:

ADDRESS HWS "SETATTR ATTR(‘ERRSTAT’) ATTRVALUE(TRUE) ENTITY(CPC(‘SAMPLE.IBM.CPCNAME’))"
Return information from SETATTR

The REXX variables HWSRC and HWSRS contain the address environment return and reason codes respectively.