Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide

_FOBJECT^INIT
A-52
109759Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
DSNM Library Services
Example
In the following example, each input object and its hierarchical subordinates appear in
the output for a STATUS command:
STRUCT input^lm^def (*);
BEGIN
_INPUT^LM^HEADER;
...
END;
STRUCT output^lm^def (*);
BEGIN
_OUTPUT^LM^HEADER;
...
END;
STRUCT command^context^def (*);
BEGIN
_COMMAND^CONTEXT^HEADER;
INT .EXT inobj (input^lm^def);
INT .EXT outobj (output^lm^def);
END;
!Thread proc locals!
INT .EXT cx (command^context^def) = _THREAD^CONTEXT^ADDRESS;
INT .EXT in (input^def) := @cx._INPUT;
INT .EXT out (output^def) := @cx._OUTPUT;
...
! Get the next input object
IF _ISNULL(@cx.inobj := _GET^LM (in.OBJECTLIST))
THEN RETURN _RC^STOP;
!Create output list member
IF _ISNULL (@cx.outobj := _PUT^LM (out.OBJECTLIST,,
$LEN (cx.outobj)))
THEN ... < out of available memory > ;
! Now cx.inobj.fobj and cx.outobj.fobj are the current
! input and output list members. Since the output object
! will be the same as the input object, use the same-fobject
! parameter:
IF (error := _FOBJECT^INIT (cx.outobj.FOBJ,
cx.inobj.FOBJ))
THEN ... < error exit > ;
! Now cx.inobj.fobj and cx.outobj.fobj are the current
! input and output objects.
! Send to CI, determine status of input object and its
! subordinates.