T24: Transaction boundary

657 views
Skip to first unread message

Anar S.V.

unread,
May 26, 2009, 8:15:52 AM5/26/09
to jBASE
Hi.

As is just regular practice in rdbms systems to set transaction
boundaries with means provided in corresponding rdbms's, I wonder
whether there are means to force locally developed routine to stay
within Transaction Boundaries in T24.
Some financial transactions in the current system doesn update all the
tables its supposed to, and we got some balance issues at the end.
Any clue or guidance appreciated.

Thanks in advance.
Regards.

Jim Idle

unread,
May 26, 2009, 11:54:04 AM5/26/09
to jB...@googlegroups.com
You don't say what your version of T24 is, nor the version of jBASE
(please read the posting guidelines below :), and I am having to guess
what you need somewhat from your description...

However, jBASE transactions are bounded by TRANSTART and TRANSEND and so
long as you do not execute the TRANSEND, you are still within the
transaction. I am given to understand that T24 now uses jBASE
transactions rather than its own internal mechanism, hence if the system
is still within a transaction before calling your routine, then it will
remain so. As to whether you can instruct T24 to keep the transaction
open while it calls your routine, I will have to defer to better
knowledge of T24.

However, if you are not within a transaction before being called, then
you can start and end your own within your routines. Note however that
transactions are not for bounding 100,000 writes, check some totals then
aborting if the totals are incorrect - you will run out of memory doing
this. Transactions are for creating atomic updates for a collection of
closely related writes. There is no upper limit to the number of writes
besides memory, but clearly there is a practicable and sensible limit of
your own devise.

Secondly, the isolation level of jBASE transactions is "Local READ
UNCOMMITTED, global READ COMMITTED", which means that a READ on the
process that is creating the transaction is able to read records that
were updated but not committed by itself, but any other process cannot
view those updates until they are committed to the database. Hence if
the T24 program is within a transaction, then EXECUTEs your program (or
you EXECUTE your program), that will be a new process that cannot see
the records yet to be committed by the parent process. This could be
another explanation for your record counts being out. If this is so,
then this is a design fault in either the T24 interface or your program;
I have not heard of anyone else having this issue so I suspect that T24
does not call your program via an EXECUTE.

That's the best I can suggest given the supplied information, so I hope
that it is of some use. If just some of your balances and not all are
out though, it sounds more like an application bug than an architectural
bug.

Jim


> Thanks in advance.
> Regards.
>
> >
>

Anar S.V.

unread,
May 26, 2009, 8:45:39 AM5/26/09
to jBASE
Sorry for inconvenience if the posting is long, but couldn find out
the way to attach jdiag.out to the original message.
-----------------------------------------------------------------------------------------------------------------

jdiag - jBASE diagnostic '$Revision: 1.13 $'

System Information
==================

System : HP-UX temenos B.11.23.U ia64
UNIX User : juser1 (uid 114, euid 114)
Tty name : /dev/pts/4
jBASE User (JBCLOGNAME) : Not Set
Time : Tue May 26 10:22:59 2009

Environment
===========

JBCPORTNO : Not Set
JBCRELEASEDIR : '/t24/jbase4_4.1.5.19'
JBCGLOBALDIR : '/t24/jbase4_4.1.5.19'
JBCDATADIR : '../bnk.data'
HOME : '/t24/BSB1/bnk.run'
JEDIFILEPATH : '/t24/BSB1/bnk.run'
JEDIFILENAME_MD : '/t24/BSB1/bnk.run/VOC'
JEDIFILENAME_SYSTEM : '/t24/jbase4_4.1.5.19/src/SYSTEM'
SYSTEM File is (DICT) : '/t24/jbase4_4.1.5.19/src/SYSTEM]D'
RELEASE Information : Major 4.1 , Minor 5.19 , Patch 5722
(Change 57964)
Spooler dir (JBCSPOOLERDIR) : '/t24/jspooler'
Spooler directory '/t24/jspooler' OK
JBCEMULATE : 'prime'
Emulation Config file '/t24/jbase4_4.1.5.19/config/Config_EMULATE' OK
JBCEMULATE Label 'prime' found in file '/t24/jbase4_4.1.5.19/config/
Config_EMULATE'

Executable search Path: /t24/jbase4_4.1.5.19/bin:/t24/jbase4_4.1.5.19/
config:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/
perl/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/contrib/
kwdb/bin:/usr/bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/
ipf/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/resmon/bin:/opt/hpsmh/bin:/
opt/gwlm/bin:/opt/gvsd/bin:/opt/sas/bin:/opt/sec_mgmt/bastille/bin:/
opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/ignite/
bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/
bin:/opt/ssh/bin:/opt/swa/bin:/opt/thunderbird:/opt/drd/bin:/opt/sfm/
bin:/usr/contrib/bin/X11:.:/usr/local/bin:/t24/BSB1/bnk.run/locbin:/
t24/BSB1/bnk.run/bin:/t24/BSB1/bnk.run/globusbin:/usr/ccs/bin:/opt/
java1.5/bin/IA64W
Shared Object search path: LD_LIBRARY_PATH=/t24/jbase4_4.1.5.19/lib:/
t24/jbase4_4.1.5.19/jdk/jre/lib:/t24/jbase4_4.1.5.19/jdk/jre/lib/
platform:/usr/ccs/lib:/usr/lib:/t24/jbase4_4.1.5.19/jdk/jvmlib

Found : '/t24/jbase4_4.1.5.19/lib/libjbase.so'
Found : '/t24/jbase4_4.1.5.19/lib/
libjbaseutil.so'
Found : '/t24/jbase4_4.1.5.19/lib/libjsub.so'
Object path (JBCOBJECTLIST) : '/t24/BSB1/bnk.run/loclib:/t24/BSB1/
bnk.run/lib:/t24/BSB1/bnk.run/globuslib'
jBASE Compiler Run-time : '/t24/jbase4_4.1.5.19/config/
system.properties'
Program dir (JBCDEV_BIN) : '/t24/BSB1/bnk.run/locbin'
Program Path '/t24/BSB1/bnk.run/locbin' is in your PATH
Subroutine dir (JBCDEV_LIB) : '/t24/BSB1/bnk.run/loclib'
Subroutine path '/t24/BSB1/bnk.run/loclib' is in JBCOBJECTLIST
Max open files : 4096

Full Environment
================

SHELL=/t24/jbase4_4.1.5.19/bin/jsh
_=jdiag
MANPATH=/t24/jbase4_4.1.5.19/man
JBCSPOOLERDIR=/t24/jspooler
JEDIFILENAME_SYSTEM=/t24/jbase4_4.1.5.19/src/SYSTEM
SHLIB_PATH=/t24/jbase4_4.1.5.19/lib:/t24/jbase4_4.1.5.19/jdk/jvmlib:/
t24/jbase4_4.1.5.19/jdk/jre/lib:/t24/jbase4_4.1.5.19/jdk/jre/lib/
platform:/usr/lib:/lib
SSH_TTY=/dev/pts/4
JBCDATADIR=../bnk.data
PATH=/t24/jbase4_4.1.5.19/bin:/t24/jbase4_4.1.5.19/config:/usr/bin:/
usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/
hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/contrib/kwdb/bin:/usr/
bin/X11:/opt/graphics/common/bin:/opt/upgrade/bin:/opt/ipf/bin:/opt/
wbem/bin:/opt/wbem/sbin:/opt/resmon/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/
opt/gvsd/bin:/opt/sas/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/
opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/ignite/bin:/opt/
mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/bin:/opt/
ssh/bin:/opt/swa/bin:/opt/thunderbird:/opt/drd/bin:/opt/sfm/bin:/usr/
contrib/bin/X11:.:/usr/local/bin:/t24/BSB1/bnk.run/locbin:/t24/BSB1/
bnk.run/bin:/t24/BSB1/bnk.run/globusbin:/usr/ccs/bin:/opt/java1.5/bin/
IA64W
LC_ALL=en_US.utf8
JBC_UNLOCK_LASTCLOSE=1
JBCGLOBALDIR=/t24/jbase4_4.1.5.19
SSH_AUTH_SOCK=/tmp/ssh-TSPaRN3006/agent.3006
CLASSPATH=/t24/BSB1/bnk.run/BSB.JAVA.PRO:/t24/jbase4_4.1.5.19/java/
lib/poi3.0.1/poi-3.0.1-FINAL-20070705.jar:/t24/jbase4_4.1.5.19/java/
lib/poi3.0.1/poi-contrib-3.0.1-FINAL-20070705.jar:/t24/jbase4_4.1.5.19/
java/lib/poi3.0.1/poi-scratchpad-3.0.1-FINAL-20070705.jar:/opt/hpws/
tomcat/webapps/BSB1/WEB-INF/lib/tsdk.jar:/opt/hpws/tomcat/webapps/BSB1/
WEB-INF/lib/tsdkfoundation.jar:/opt/hpws/tomcat/webapps/BSB1/WEB-INF/
lib/AccountValidator.jar:/opt/hpws/tomcat/webapps/BSB1/WEB-INF/lib/
LOGNAME=juser1
JEDIFILEPATH=/t24/BSB1/bnk.run
JBCLISTFILE=/t24/BSB1/bnk.run/&SAVEDLISTS&
LIBPATH=/t24/jbase4_4.1.5.19/lib:/t24/jbase4_4.1.5.19/jdk/jre/lib:/
t24/jbase4_4.1.5.19/jdk/jre/lib/platform:/usr/ccs/lib:/usr/lib:/t24/
jbase4_4.1.5.19/jdk/jvmlib
MAIL=/var/mail/juser1
SFTP_UMASK=
JBCRELEASEDIR=/t24/jbase4_4.1.5.19
ERASE=^H
SFTP_PERMIT_CHOWN=1
JBASE_DEBUG_PIPE=1
JBASE_INHIBIT_ZERO_USED=1
USER=juser1
JBCDEV_LIB=/t24/BSB1/bnk.run/loclib
JBCDEV_BIN=/t24/BSB1/bnk.run/locbin
JEDIFILENAME_MD=/t24/BSB1/bnk.run/VOC
BHOME=/opt/hpws/tomcat/webapps/BSB1/WEB-INF/lib/tsdk.jar:/opt/hpws/
tomcat/webapps/BSB1/WEB-INF/lib/tsdkfoundation.jar:/opt/hpws/tomcat/
webapps/BSB1/WEB-INF/lib/AccountValidator.jar:/opt/hpws/tomcat/webapps/
BSB1/WEB-INF/lib/
ICU_DATA=/t24/jbase4_4.1.5.19
JBCOBJECTLIST=/t24/BSB1/bnk.run/loclib:/t24/BSB1/bnk.run/lib:/t24/
BSB1/bnk.run/globuslib
JBCJVMOPT1=-Xmx64M
HOME=/t24/BSB1/bnk.run
LD_LIBRARY_PATH=/t24/jbase4_4.1.5.19/lib:/t24/jbase4_4.1.5.19/jdk/jre/
lib:/t24/jbase4_4.1.5.19/jdk/jre/lib/platform:/usr/ccs/lib:/usr/lib:/
t24/jbase4_4.1.5.19/jdk/jvmlib
TERM=vt100
JBASE_I18N=1
JBASE_CODEPAGE=utf8
PWD=/t24/BSB1/bnk.run
JVMLIB=/t24/jbase4_4.1.5.19/jdk/jvmlib
JREDIR=/t24/jbase4_4.1.5.19/jdk/jre
JBCEMULATE=prime
TZ=GMT+4
JEDIENABLEQ2Q=1
SFTP_PERMIT_CHMOD=1
JBASE_WARNLEVEL=30
JBCBASETMP=/t24/BSB1/bnk.run/jBASEWORK/tmp_4
JRELIB=/t24/jbase4_4.1.5.19/jdk/jre/lib:/t24/jbase4_4.1.5.19/jdk/jre/
lib/platform
JBCLKFILE=/t24/jbase4_4.1.5.19/tmp/LOCKFILE
JBCPAUSEFILE=/t24/jbase4_4.1.5.19/tmp/PAUSEFILE
JBCERRFILE=/t24/jbase4_4.1.5.19/jbcmessages
JBASE_LOCALE=C
There are No warnings, jBASE seems to be loaded correctly

Anar S.V.

unread,
May 27, 2009, 1:32:36 AM5/27/09
to jBASE
Grateful for the comprehensive info on the subject.
Seems I noticed your reply late.

John Watson

unread,
May 27, 2009, 8:06:52 AM5/27/09
to jBASE
As this is T24 it is controlled by T24 utilities.

Always use a call to F.WRITE / F.MATWRITE - never the native functions
- in online this caches the write to the end of the transaction when
you call JOURNAL.UPDATE which wraps the transaction in boundaries.

In COB it is the main batch job management routine that controls
transaction boundaries as an F.WRITE with RUB is not cached and is
immediate.

Never call JOURNAL.UPDATE in a version routine as you will flush any
cached writes from T24 as well as the ones you intend. The final
processing of the application will deal with the cached writes for
you.

Depending on T24 you can set INFO.JOURNAL on the SPF to see a post
transaction image of all records updated by a transaction - if you get
two F.JOURNAL records for one transaction then you have an ACID non-
comnpliant transaction...

Anar S.V.

unread,
May 29, 2009, 2:54:59 AM5/29/09
to jBASE
Thanks for clues and comprehension on the subject.
Grateful.

Regards.
Reply all
Reply to author
Forward
0 new messages