Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
DSNM Library Services
Distributed Systems Network Management (DSNM) Subsystem Interface Development
Guide—109759 A-95
_PUSH^THREAD^PROCSTATE
_PUSH^THREAD^PROCSTATE
_PUSH^THREAD^PROCSTATE saves the current thread procedure and thread state,
and optionally sets new values for the current thread procedure and thread state.
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.
procname input
is a thread procedure that becomes the current thread procedure after the existing
thread procedure is saved.
state input
INT:value
is an INT expression that becomes the current thread state after the existing value is
saved.
Considerations
•
If procname and state are not provided, the current thread procedure and thread
state are saved, and no new current thread procedure and state are set.
•
The current thread procedure is defined as the procedure called by the frame the next
time the thread is dispatched.
•
_POP^THREAD^PROCSTATE restores the values of the thread procedure and
thread state saved with the last _PUSH^THREAD^PROCSTATE.
Example
In the following example, the frame dispatches PROC^X of the command thread in
_ST^INITIAL. PROC^X calls PROC^Y in STATE^B by:
•
Setting its return state to STATE^A.
•
Saving the old current thread procedure and state values, and setting new current
thread procedure and thread state values.
•
Signaling an event and returning to the frame to dispatch the new thread procedure
PROC^Y in the new state STATE^B.
error := _PUSH^THREAD^PROCSTATE ( [ @procname ]
,[ state ] );