infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
TCL to write message to the error database.
Mike Campbell
"Anyone have a tcl proc that will send an HL/7 message to the error database? Called from within an Xlate. We are migrating to use jdbc queries and am finding out when the database isn't available there is a message logged in the site.log and site.err, but the message isn't sent to the error database. CL vs. 19.1.2.2"
Find more posts tagged with
Clovertech
Comments
david_barr
You can probably just say something like:
error "my error description here"
and that will cause a TCL error which normally sends messages to the error database. You can probably call that from an Xltp if you need to do it from an Xlate.
Jim Kosloskey
On the Action where you invoke your Tcl to query the DB there is a place to specify what should happen if an error is thrown, then in your code use the XPMERROR statement.
Look up the XMPERROR statement in the User Doc for the up-to-date usage.
Are you using the XPMERROR and it is not working? I know it did not work in some CL releases but I thought it was fixed by 19.x.
Mike Campbell
With some expert help and guidance from Jim Kosloskey, I was able to get the xpmerror to work and send the message to the error database.
Thanks all!
Mike Campbell
A brief follow-up. This is mainly to those new to utilizing the jdbc process to query external databases. I won't go through setting up the jdbc 'tables' used but rather on how to handle errors.
Cloverleaf - 19.1.2.2
We discovered that if there was a connection error, information would be written to the .err and/or .log. Nothing real-time was sent stating an error occurred. The message would still be sent, however the information might be missing or incorrect if based on the query result.
To remedy that we created an email tcl proc to check the built-in jdbc error flag of
@tbl_errno
. 0 [zero] is successful. -1 is an error condition. Greater than 0 means multiple rows were returned. So, if -1, we generate an email stating the error, with information needed for research, etc. We also created a tclproc to send the mesasge to the error database, and suppress it from being sent out.
The error database tcl uses:
xpmerror
xpmId severity message - to do the work. Fairly easy to work with.