Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Creating an Access Definition File Guide


$SETARRAY (set value to array)

$SETARRAY adds information to an array.

Organization of this page

Syntax

$SETARRAY(array-name,character-string)

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end

NODATA

ERROR

Script execution interrupted

An invalid argument was specified, or an error other than the above occurred.

Legend:

—: Not applicable

Example

The following example initializes the array ARY and sets to it array data ARY[1] aaa, ARY[2] bbb, and ARY[3] ccc. In this example, the value in array number 2 of the created array variable is then updated to ddd, which is then acquired and output.

[SET_VALUE]
  $CLEARARRAY(ARY)
 
  $SETARRAY(ARY,'aaa')
  $SETARRAY(ARY,'bbb')
  $SETARRAY(ARY,'ccc')
 
  $UPDARRAY(ARY,2,'ddd')
 
  VAL = $GETARRAY(ARY, 2)
  MSG = 'ARY = ' + VAL
  $ECHO(MSG)
Execution result:

ARY = ddd