Hitachi

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


$SUBSTR (get substrings)

$SUBSTR extracts a portion of a character string from a specified character string as defined by the extraction start position and the length of the character substring being extracted.

Organization of this page

Syntax

return-value=$SUBSTR(base-character-string,extraction-start-position,length-of-extracted-string)

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end

NODATA

No character string existed at the specified extraction start position.

ERROR

—

Script execution interrupted

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

Legend:

—: Not applicable

Example

The following example sets the character string ABCDEFG into NAME, and then extracts ABC from NAME and sets it into VALUE:

[SET_VALUE]
  NAME = 'ABCDEFG'
  VALUE=$SUBSTR(NAME,0,3)
  $ECHO(VALUE)
Execution result:

ABC