Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
DSNM Library Services
Distributed Systems Network Management (DSNM) Subsystem Interface Development
Guide—109759 A-131
_UNGET^LM
_UNGET^LM
_UNGET^LM replaces the last list member removed from a list using _GET^LM.
error returned value
INT
is a ZDSN^ERR value indicating the outcome of the call. See Appendix B, “DSNM
Error Codes,” for error code definitions.
list input
is the name of a _LIST.
list-member input
INT .EXT
is a pointer to the member most-recently removed from list with _GET^LM.
Specifying a list member that is not the most-recently removed with _GET^LM
invalidates the _UNGET^LM operation. Also, any intervening _PUT^LM or
_DEALLOCATE^LIST invalidates the _UNGET^LM operation. Results from any of
these are unpredictable.
Example
In the following example, members of worklist are examined and removed up to the
first member that does not match a particular control value:
_LIST (worklist);
INT .EXT list^member (list^member^def);
! list^member^def includes control^field
WHILE _NOTNULL (@list^member := _GET^LM (worklist))
AND list^member.control^field = current^ctl^value
DO
BEGIN
< process all list^members matching current^ctl^value>
END;
! Put non-matching list^member back
IF _NOTNULL (@list^member)
THEN IF (error := _UNGET^LM (worklist, list^member))
THEN ... < data corrupted > ;
error := _UNGET^LM ( list
,list-member );