Hitachi

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


$NUMBER (numbering)

$NUMBER uses the object class FunctionInfo to acquire a unique number used by the asset management system database. You can retrieve numbers by specified function ID and extend ID ranging from 1 to 4,294,967,295 (10 digits).

If 4,294,967,295 is exceeded, the function returns to 1. If the number is less than ten digits, zeros are inserted into the unfilled digit places.

Organization of this page

Syntax

return-value=$NUMBER(function-ID,extend-ID)

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end

NODATA

ERROR

Script execution interrupted

Indicates one of the following:

  • Database access error.

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

Legend:

—: Not applicable

Remarks

You must also register to the object class FunctionInfo the exclusion control lock record that corresponds to the function ID.

The following shows an example of the data file that is imported into FunctionInfo, with a function ID of USER and an extend ID of Number.

OP,CreationClassName,FunctionID,ExtendID,UpdateDate,SequenceNo
a,FunctionInfo,USER,Number,2003/1/1,0
a,FunctionInfo,USER,NumberLock,2003/1/1,0

Example

The following example uses the function ID USER and the extend ID Number to acquire a number (0000000001):

[SET_VALUE]
  VAL = $NUMBER('USER' , 'Number')
  MSG = 'NUMBER = ' + VAL
  $ECHO(MSG)
Execution result:

NUMBER = 0000000001