OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_trn_info - Report the information about the current transaction

Format

ANSI C, C++

#include <dctrn.h>
int  dc_trn_into (char *flags)

K&R C

#include <dctrn.h>
int  dc_trn_info (flags)
char      *flags;

Description

The function dc_trn_info() returns information which indicates whether the UAP that called the function dc_trn_info() is operating as the current transaction.

Only the process that started the UAP which is created correctly according to the specification in this manual is permitted to call the function dc_trn_info(). To have the service which calls the function dc_trn_info() terminated normally, specify the transaction attribute at UAP execution environment setup.

Argument whose value is set in the UAP

flags

Specify a NULL.

Return values

Return value Explanation
1 The process that called the function dc_trn_info() is operating as a transaction.
0 The process that called the function dc_trn_info() is not operating as a transaction.

Example

if(!dc_trn_info(NULL)&&dc_trn_begin() <0)
  fputs("cannot begin transaction\n", stderr);

Note

This API does not obtain a UAP trace.