$ IF F$GETSYI("CLUSTER_MEMBER") .EQS. "FALSE" THEN GOTO NOT_CLUSTER
$ CONTEXT = ""
$START:
$ id = F$CSID (CONTEXT)
$ IF id .EQS. "" THEN EXIT
$ nodename = F$GETSYI ("NODENAME",,id)
$ WRITE SYS$OUTPUT nodename
$ GOTO start
$NOT_CLUSTER:
$ WRITE SYS$OUTPUT "Not a member of a cluster."
$ EXIT
This command procedure uses the F$CSID function to display
a list of cluster system names. The assignment statement
declares the symbol CONTEXT, which is used as the context-
symbol argument for the F$CSID function. Because CONTEXT is
equated to a null string, the F$CSID function will return the
first cluster identification number in the cluster node list.
If the F$CSID function returns a null value, then the command
procedure either is at the end of the list, or is attempting
this operation on a nonclustered node. The call to F$GETSYI
checks whether the current node is a member of a cluster. The
command procedure will exit on this condition.
If the F$CSID function does not return a null value, then the
command procedure uses the identification number as the third
argument to the F$GETSYI function to obtain the name of the
system. The name is then displayed using the WRITE command.