/sys$common/syshlp/helplib.hlb System Services, $START TRANS *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Starts a new transaction. Format SYS$START_TRANS [efn] ,[flags] ,iosb [,[astadr] ,[astprm] ,[tid] ,[timout] ,[acmode]] C Prototype int sys$start_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. The flags currently defined are shown in the following table: Flag Description DDTM$M_NONDEFAULT Set this flag if you do not want the new transaction to be the default transaction of the calling process. If this flag is clear, the new transaction becomes the default transaction of the calling process. An error is returned if this flag is clear and the calling process already has a default transaction. DDTM$M_PROCESS Set this flag if you do not want the DECdtm transaction manager to try to abort the transaction if the current image terminates. If this flag is clear, when the current image terminates (normally or abnormally), the DECdtm transaction manager will abort the transaction if it has not already committed. An error is returned if this flag is set and the caller is in user mode. 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 completion status of the service is returned as a condition value. Refer to the OpenVMS System Services Reference Manual to view the I/O status block 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. The astadr argument is the address of this routine. This 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: write only mechanism: by reference Address of an octaword in which the service returns the identifier of the new transaction. timout OpenVMS usage:date_time type: quadword (unsigned) access: read only mechanism: by reference Timeout for the new transaction. This is the time at which the DECdtm transaction manager is to abort the transaction if the transaction has not already committed. The time value is a binary number, in units of 100 nanoseconds. A positive time value specifies an offset from the system base time. The system base time is 00:00 hours November 17, 1858. A negative time value specifies an offset from the current time to some time in the future. The transaction is aborted at the next timer interval if you specify either a zero time value or any time in the past. If this argument is omitted, the new transaction has no timeout. acmode OpenVMS usage:access_mode type: longword (unsigned) access: read only mechanism: by value The least privileged access mode that the calling process must be in to end the transaction by calling $END_TRANS. Note that the calling process can end the transaction by calling $ABORT_TRANS from any access mode. The access mode that the calling process must be in to end the transaction by calling $END_TRANS is whichever is the least privileged of the following: o The access mode of the caller o The access mode specified by the acmode argument If the acmode argument is omitted, it defaults to the access mode of the caller.
|