Hitachi

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


[ASSOC_FIND] (find association class)

[ASSOC_FIND] uses an association class to search classes.

If the class being searched matches the specified conditions, its property values are substituted into the declared variables. You can specify the [ASSOC_FIND] tag the number of times of required to find the base object class.

Organization of this page

Syntax

[ASSOC_FIND]
  association-class-name
   ([FIND_DATA])
    condition-expression
  [CLASS1]
    object-class-name
  [CLASS2]
    another-object-class-name
  [GET_VALUE]
    assignment-statement
   ([ORDER_ASC] or [ORDER_DESC])
    sort-key

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end.

NODATA

No data satisfies the search conditions.

ERROR

MULTI

Legend:

—: Not applicable

Example

The following example acquires the group to which user ID user1 belongs:

[ASSOC_FIND]
  MemberLink
[FIND_DATA]
  UserInfo.UserID = 'user1'
[CLASS1]
  UserInfo
[CLASS2]
  GroupInfo
[GET_VALUE]
  FULLPATH = GroupInfo.FullPathName
 
[SET_VALUE]
  STATUS = $GETSTATUS()
[IF]
  STATUS = NORMAL
[THEN]
  [SET_VALUE]
    MSG = 'FullPathName :' +FULLPATH
    $ECHO(MSG)
[ELSE]
  [SET_VALUE]
    MSG = 'ASSOC_FIND (' +STATUS+ ')'
    $ECHO(MSG)
[IF_END]