Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
_COMMAND^CONTEXT^HEADER
A-32
109759—Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
DSNM Library Services
_COMMAND^CONTEXT^HEADER
_COMMAND^CONTEXT^HEADER defines and reserves the fixed header portion of
the command context space that is allocated to each thread when it is created and that
persists until the thread terminates. This part of the command context space is reserved
for the specific uses described in Section 3, “I Process Development Process.”
Considerations
All private data used by the command thread must be defined in the command context
space or members of lists. Data in global areas is shared by all active threads and may
only be used as read-only data. Data in the local procedure is destroyed with each return
to the frame by any of the following:
•
_RETURN _RC^xxx
•
_DISPATCH^THREAD
•
_SAVE^THREAD^AND^DISPATCH
•
_RESTORE^THREAD^AND^DISPATCH
The frame initializes the user-data area of the command context space to 0. Specify the
length of the command context structure in your _STARTUP procedure, as in the
following example:
INT PROC _STARTUP (context^length, input^lm^length) EXTENSIBLE;
INT .context^length, .input^lm^length;
BEGIN
context^length := $LEN (command^context^def);
input^lm^length := $LEN (input^lm^def);
.
RETURN ZDSN^ERR^NOERR;
END;
Example
The following example declares a command context structure:
STRUCT COMMAND^CONTEXT^DEF (*);
BEGIN
_COMMAND^CONTEXT^HEADER;
<user-defined data>
.
END;
See the _FOBJECT^INIT description for another _COMMAND^CONTEXT^HEADER
example.
_COMMAND^CONTEXT^HEADER;