HELPLIB.HLB  —  Lexicals  F$CSID
    Returns an identification number from an OpenVMS Cluster system
    and updates the context symbol to point to the current position
    in the system's cluster node list.

    Format

      F$CSID(context-symbol)

1  –  Return Value

    A character string containing the system cluster identification
    number in the system's list of clustered nodes. If the current
    system is not a member of a cluster, the first return value is
    null. After the last system cluster identification number is
    returned, the F$CSID function returns a null string ("").

2  –  Arguments

 context-symbol

    Specifies a symbol that DCL uses to store a pointer into the
    system's list of clustered nodes. The F$CSID function uses this
    pointer to return a cluster identification number.

    Specify the context-symbol argument by using a symbol. The first
    time you use the F$CSID function, use a symbol that is either
    undefined or equated to the null string.

    If the context-symbol argument is undefined or equated to a null
    string, the F$CSID function returns the cluster identification
    number of the first system in the system's cluster node list.
    Subsequent calls to the F$CSID function will return the cluster
    identification number of the rest of the nodes in the cluster.

3  –  Example

  $ 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.
Close Help