Hitachi

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


$GOSUB (execute subroutine)

$GOSUB executes a subroutine defined by the [SUB] tag. The subroutine to be executed must be defined before the $GOSUB function appears.

Organization of this page

Syntax

$GOSUB(subroutine-name)

Values

Example

The following example creates a subroutine to perform the processing for outputting a message according to the value in the session information MSG:

[SUB]
  ECHO
  [IF]
    MSG = '1'
  [THEN]
    [SET_VALUE]
      $ECHO(ECHOMSG)
  [IF_END]
[SUB_END]
 
[BEGIN]
  [SET_VALUE]
    MSG = $GETSESSION('MSG')
 
    ECHOMSG = 'Hello world'
    $GOSUB(ECHO)
[END]