Table 55 makestring expression definitions, Setlist, Start – HP StorageWorks XP Remote Web Console Software User Manual

Page 189: Work variables, 55 makestring expression definitions

Advertising
background image

TrueCopy for z/OS user guide 189

format for the MakeString command is:

MakeString $D= output buffer ,$Fmt= expression 1,$Item= expression 2

For example, to create a MakeString statement that will convert the 16-bit numeric expression to a

hexadecimal number (0 - 0xffff) and set the string as it is, with an output buffer of _sMsg, the command

would be:

MakeString $D=_sMsgB

,$Fmt=“EndCode=(0x%x):%s”

,$Item=_Result,_sMsgA

For the MakeString command listed above: _sMsgB = “EndCode=(0x110f):Error Occurred”.

SetList

Use the SetList command to assign specific items to a list. The format of the SetList command is: SetList $D=

output list,$S=expression(attribute of the items to be assigned to the list with a numeric range of 0x0000 to

0xffff). For example, to set 0, 1, 2, 0x1e, and 0x1f to be displayed in the Dev (Device) B list the command

would be:

SetList $D=ilDevB,$S={0,1,2,0x1e,0x1f}

Start

Use the Start command to declare the beginning of a script and check to verify that the controller name

matched the connected controller. When using the Start command, several conditions must be met. The

Start command must be described on the first line of the script. The Start statement cannot include a

comment statement, an empty statement or a blank statement. The Start statement must be displayed at the

beginning of every script. If the controller name does not match the connected controller, an error will

occur and the script will be aborted. The format of the Start command is: Start $Script=“HRC”,$Svr=

controller name. For example, to start a script for a controller named Training XP1024 the command would

be:

Start $Script=“HRC”,$Svr=“Training XP1024”

NOTE:

The controller name check is not available for this version. Therefore, the contents of the $Svr does

not affect the script file execution.

Work Variables

There are two types of work variables: list type and non-list type. All work variables are initialized before a

script is executed.

Numeric work variables may have a value between 0x0000 and 0xffff. Numeric work variables are

initialized with 0.

A non-list string work variable may have a string with length up to 150 bytes. A list string work variable

may have strings with length up to 16 bytes each. String work variables are initialized with a null string

whose length is 0.

A list work variable may have up to 1,024 items. A non-list work variable is a constant. List work

variables are initialized as empty (no items).

Table 55

MakeString expression definitions

Expression 1

Expression 2

Expression 1 is one of three format control strings

($Fmt):

%d Converts a 16-bit numeric expression to a

decimal number (0 - 65535).
%x Converts a 16-bit numeric expression to a

hexadecimal number (0 - 0xffff).
%s Sets a string as it is.

Expression 2 is any expression not containing a list

reserved variable (must be constant or work variable).

Advertising