VMS Help
System Services, $ABORT TRANS

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Ends a transaction by aborting it.

    Format

      SYS$ABORT_TRANS  [efn] ,[flags] ,iosb [,[astadr] ,[astprm]

                       ,[tid] ,[reason]]

    C Prototype

      int sys$abort_trans  (unsigned int efn, unsigned int flags,

                           struct _iosb *iosb,...);

    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 set.

 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 these option
    flags. All undefined bits must be 0. If this argument is omitted,
    no flags are set.

    DDTM$M_SYNC, the only flag currently defined, is described in the
    following table:

    Flag           Description

    DDTM$M_SYNC    Set this flag to specify that successful
                   synchronous completion is to be indicated by
                   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
    I/O status block in which the following information is returned:

    o  The completion status of the service, returned as a condition
       value.

    o  An abort reason code that gives one reason why the transaction
       aborted, if the completion status of the service is SS$_
       NORMAL.

       Note that, if there are multiple reasons why the transaction
       aborted, the abort reason code returned in the I/O status
       block might not be the same as the abort reason code passed
       in the reason argument. The DECdtm transaction manager returns
       one of the reasons in the I/O status block.

       For example, if the call to $ABORT_TRANS gives DDTM$_ABORTED
       as the reason and the transaction timeout expires at about the
       same time as the call to $ABORT_TRANS, then either the DDTM$_
       TIMEOUT or DDTM$_ABORTED reason code can be returned in the
       I/O status block.

    The $DDTMMSGDEF macro defines symbolic names for abort reason
    codes. Those currently defined are shown in Abort Reason Codes.

    Table SYS-1 Abort Reason Codes

    Symbolic Name        Description

    DDTM$_ABORTED        The application aborted the transaction.
    DDTM$_COMM_FAIL      A communications link failed.
    DDTM$_INTEGRITY      A resource manager integrity constraint
                         check failed.
    DDTM$_LOG_FAIL       A write operation to the transaction log
                         failed.
    DDTM$_PART_SERIAL    A resource manager serialization check
                         failed.
    DDTM$_PART_TIMEOUT   The timeout specified by a resource manager
                         expired.
    DDTM$_SEG_FAIL       A process or image terminated.
    DDTM$_               A DECdtm transaction manager serialization
    SERIALIZATION        check failed.
    DDTM$_SYNC_FAIL      The transaction was not globally
                         synchronized.
    DDTM$_TIMEOUT        The timeout specified on $START_TRANS
                         expired.
    DDTM$_UNKNOWN        The reason is unknown.
    DDTM$_VETOED         A resource manager was unable to commit the
                         transaction.

    Refer to the OpenVMS System Services Reference Manual to view the
    I/O status block structure diagram.

 astadr

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

 astprm

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

 tid

    OpenVMS usage:transaction_id
    type:         octaword (unsigned)
    access:       read only
    mechanism:    by reference
    Identifier of the transaction to be aborted.

    If this argument is omitted, $ABORT_TRANS aborts the default
    transaction of the calling process.

 reason

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    Code that gives the reason why the application is aborting the
    transaction. The $DDTMMSGDEF macro defines symbolic names for
    abort reason codes. The default value for this argument is DDTM$_
    ABORTED.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.