SPI Common Extensions Manual
Extended SPI Concepts
SPI Common Extensions Manual—427508-001
2-4
Object Names
Object Names
An object’s name combined with its type, the name of its manager process, and the
subsystem ID uniquely identifies the object in a NonStop Kernel network at a given
time. In the context of a running subsystem, name and type together uniquely identify
an object, and all objects of the same type must have unique names.
Three tokens are commonly used to convey object names:
The object name must consist of alphanumeric characters and be assigned to a
program variable that you can use in an SPI procedure. Because the token type is
ZSPI-TYP-STRING, you must use a structure that specifies the name of the object and
the length of the name.
Assigning Object Names
To assign an object name (in this example, for the line $LM) to a program variable and
put it in a command message:
1. Declare a structure (such as that required for a string variable) that contains the
length and value of the variable.
ZCOM^VAL^OBJNAME^LEN specifies the maximum length for the string of
characters that specifies the object name:
STRUCT .objname;
BEGIN
INT length;
STRING name[0:ZCOM^VAL^OBJNAME^LEN - 1];
END;
2. Assign the object name and the length of the name to the structure:
objname.name ':=' "$LM";
objname.length := 3;
3. Put the token code and the variable containing the token value in the message
buffer:
status := SSPUTTKN(message^buffer,ZCOM^TKN^OBJNAME,objname);
ZCOM-TKN-OBJNAME Use in commands and responses to specify the name of
the objects to which the command is applied. (In
commands, you can qualify it with the SUB and SEL-
SUMSTATE modifiers.)
ZCOM-TKN-TARGET-OBJNAME Use to specify the name of a second object in
commands that act on pairs of objects (CONNECT and
DISCONNECT, for example).
ZCOM-TKN-SUBJ-objtype Use in events to identify the subject of the event.