VMS Help  —  System Services, $ADD BRANCH
    Authorizes a new branch to be added to a transaction.

    Format

      SYS$ADD_BRANCH  [efn] ,[flags] ,iosb ,[astadr] ,[astprm] ,tid

                      ,tm_name ,bid

    C Prototype

      int sys$add_branch  (unsigned int efn, unsigned int

                          flags, struct _iosb *iosb, void

                          (*astadr)(__unknown_params), int astprm,

                          unsigned int tid [4], void *tmname,

                          unsigned int bid [4]);

1  –  Arguments

 efn

    OpenVMS usage:ef_number
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    Number of the event flag that is set when the service completes.
    If this argument is omitted, event flag 0 is used.

 flags

    OpenVMS usage:mask_longword
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    Flags specifying options for the service. The flags argument
    is a longword bit mask in which each bit corresponds to an
    option flag. The $DDTMDEF macro defines symbolic names for the
    option flag, which is described in $ADD_BRANCH Option Flag. All
    undefined bits must be 0. If this argument is omitted, no flags
    are used.

    Table SYS-10 $ADD_BRANCH Option Flag

    Flag Name   Description

    DDTM$M_     Specifies successful synchronous completion by
    SYNC        returning SS$_SYNCH. When SS$_SYNCH is returned,
                the AST routine is not called, the event flag is not
                set, and the I/O status block is not filled in.

 iosb

    OpenVMS usage:io_status_block
    type:         quadword (unsigned)
    access:       write only
    mechanism:    by reference
    The I/O status block in which the completion status of the
    service is returned as a condition value.

    To view the I/O status block diagram, see the VSI OpenVMS System
    Services Reference Manual.

 astadr

    OpenVMS usage:ast_procedure
    type:         procedure entry mask
    access:       call without stack unwinding
    mechanism:    by reference
    The AST routine executed when the service completes, if SS$_
    NORMAL is returned in R0. The astadr argument is the address
    of the entry mask of this routine. The routine is executed in
    the same access mode as that of the caller of the $ADD_BRANCH
    service.

 astprm

    OpenVMS usage:user_arg
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    The AST parameter that is passed to the AST routine specified by
    the astadr argument.

 tid

    OpenVMS usage:trans_id
    type:         octaword (unsigned)
    access:       read only
    mechanism:    by reference
    The identifier (TID) of the transaction for which a new branch is
    to be authorized.

 tm_name

    OpenVMS usage:char_string
    type:         character-coded text string
    access:       read only
    mechanism:    by descriptor-fixed-length string descriptor
    The name of the node on which the new branch is running. Note
    that this cannot be a cluster alias.

    To ensure smooth operation in a mixed-network environment,
    refer to the chapter entitled Managing DECdtm Services in the
    VSI OpenVMS System Manager's Manual, for information on defining
    node names.

 bid

    OpenVMS usage:branch_id
    type:         octaword (unsigned)
    access:       write only
    mechanism:    by reference
    An octaword in which the identifier (BID) of the new branch is
    returned. No other call to $ADD_BRANCH on any node ever returns
    the same BID value.
Close Help