ITEM: L3849L

ENCINA: 1 F ENC-trc-0026: The abortModuleName called outside onAbort



Question:

System Configuration:

     AIX 3.2.5
     Encina 1.1.2
     xlc 1.3.0.0

The customer is trying to run the sample program from the Tran-C
reference manual. Anytime the transaction aborts, the program core
dumps with the following message:
 "1 F ENC-trc-0026: The abortModuleName function was called outside the
scope of an onAbort clause"

Response:

There were a few typos in the Encina Tran-C Reference Manual.
Here is a copy of the program and makefile that worked.

hello.c
/******************************/
\#include \
inModule("helloworld");

void main()
{  int i;
  inFunction("main");
  initTC();
  for(i=0;i\<10;i++) {
    transaction {
      printf("Hello World - transaction %d\\n", getTid());
      if (i % 2)
          abort("Odd Numbered Transactions are aborted...");
    }
    onCommit
      printf("\\t(Transaction committed)\\n");
    onAbort
      printf("Aborted in module : %s\\n\\t%s\\n", abortModuleName(),
            abortReason());
   }
}/**************************/

Makefile:

INSTALLDIR=/usr/lpp/encina
DCEDIR=/usr/lpp/dce
DCE_IDIR=$(DCEDIR)/include
IDIR=$(INSTALLDIR)/include
DCE_LDIR=$(DCEDIR)/lib
LDIR=$(INSTALLDIR)/lib

TCLIBS= -lEncina -ldce -lm

hello: hello.c
        cc_r hello.c -o hello -I$(IDIR) -I$(DCE_IDIR) -L$(LDIR) \\
        -L$(DCE_LDIR) $(SYSTEM_LIBS) $(TCLIBS)

clean:
        rm -f hello *.o core


Response:

This is a problem with the C compiler. Here is the exact error message
the program experienced:

\# hello
Hello World - transaction 65536
        (Transaction committed)
Hello World - transaction 1
    1 F  ENC-trc-0026: The abortModuleName function was called outside the scope 
of an onAbort clause. : hello.c (19)
        (0x2c200826) : tc
   1 F  /project/oltp111/build/prod/oltp/source/src/client/tc/client/tc_error.c
        125
Dumping core after receiving signal SIGIOT

The problem was corrected by applying PTF U421749 (for xlccmp.obj).


Support Line: ENCINA: 1 F ENC-trc-0026: The abortModuleName called outside onAbort ITEM: L3849L
Dated: August 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:41
Comments or suggestions? Contact us