Using NS3000/iX Network Services (36920-90008)

Chapter 6 113
Intrinsics for Node and Environment Status
NSINFO Intrinsic
Description
The NSINFO intrinsic is used to obtain information associated with
environments defined in a job or session. There are two different ways
that this intrinsic may be called. In the first method, envID/envnum
define the specific environment or generic environment for which
information is desired. In the second method, envID specifies the node
name for which node-specific information is desired.
Selection of the environment may be done by environment ID string or
by environment number. The presence and value of the envID,
envIDlength, and envnum parameters determine which mode is used. Also,
these parameters are both input and output; the selected environment’s
ID or number can be retrieved through them. The rules for using the
envID, envIDlength, and envnum are:
•IfenvID and envIDlength are specified, and envIDlength is greater than
0, the environment will be determined by the environment ID in
envID. If envnum is specified and its value is 0, the environment
number will be determined by the environment specified in envID.
•IfenvID and envIDlength are omitted, or if envIDlength is 0, the
environment will be selected by the environment number in envnum.
If envID and envIDlength are specified, and envIDlength is 0, they will
be set to the environment ID string and its length.
•IfenvID and envIDlength are omitted or envIDlength is 0, and envnum is
0, the default environment for the calling process will be selected.
The default environment number will be returned in envnum, and its
environment ID string and length will be returned in envID and
envIDlength respectively, if specified. Note: The default environment
is defined per process not per job or session.
Some services interpret envID as either a node name or a generic
environment ID (such as items 26, 27 and 13, 14). In calls that use
an item number such as this, envID and envIDlength are required
parameters.
For services that are not dependent on any environment
specification (such as items 8 or 18, 19), envID, envIDlength, and
envnum are not required parameters.
Items that flag a certain condition, such as item 16 (logged on status) or
12 (RFA service established), will return either an odd (TRUE) or an
even (FALSE) value.
This intrinsic may not be called in split stack mode.
Errors
Table 6-1 lists the errors that are returned in status upon completion of
an NSINFO call. If an error is returned, all data returned from the call
should be disregarded.