SPI Programming Manual (G06.24+, H06.03+, J06.03+)

SPI Programming in TACL
SPI Programming Manual427506-006
8-7
Identifying Null Values
Values of token data type ZSPI^TDT^SSID have the external format described in
Subsystem ID
on page 8-3. Values of token data type ZSPI^TDT^ERROR consist of a
subsystem ID in that format followed by a period and a numeric character string
representing a number in the range -32768 to +32767.
Values of token data type ZSPI^TDT^TRANSID have this external format:
\system-name(crash-count).cpu.sequence
If the internal-format TRANSID contains a crash count of zero, the TRANSID is
formatted as:
\system-name.cpu.sequence
In any of the cases above, if the system is not named the TRANSID is formatted as:
cpu.sequence
On output, if TACL cannot find the name of a system, TACL replaces system-name
with
system-number.
Values of token data types ZSPI^TDT^MAP and ZSPI^TDT^STRUCT must be placed
in a STRUCT or retrieved from a STRUCT, and your macro or routine must handle
them with #SSGETV and #SSPUTV. The definition of the STRUCT provides the rules
for conversion between internal and external formats.
If the token-length field of a token is less than 255 and the token data type is any other
than ZSPI^TDT^CHAR, ZSPI^TDT^MAP, or ZSPI^TDT^STRUCT, the token value is
represented by a space-separated list of
m/n items, where m is the true length of the
token and
n is the basic length of the token data type. If m is not evenly divisible by n,
the last bytes cannot be set or seen. Each item is in its usual external representation.
If the token-length field of a token is 255, the token value is of variable length. TACL
represents such a token value externally as a numeric character string representing
the one-word byte length of the token, followed by a space, followed by the token value
or values. For example, a variable-length character string containing the characters
abcd is represented as
4 abcd
Likewise, a variable-length array containing the integers 1, 2, 3, and 4 is represented
as
8 1 2 3 4
Identifying Null Values
Null values for fields of an extensible structured token often are not acceptable values
in TACL. You can determine whether a field of an extensible structured token (for
instance, in a response from a subsystem) has a null value by comparing the field in
question with the corresponding field of an extra copy of the structure, initialized with
SSNULL. To perform this comparison without causing a TACL type-checking error, use
the #COMPAREV built-in function.