TRANSACTION – XML definitions for transaction processor – ubtransaction and ubtp


transaction – transaction processor records in XML format


ubtransaction reads XML format records and processes them to do a range of updates and processes on the database.

The different commands are:

  • ADD
  • DATA

ubtransaction uses two security models. At this time these are not high security but adequate for most installations.

Method 1. Local sessions will be processed if the environment variable “REMOTE_USER” is set. This is done automatically for web based access from ubprompt for data table updates etc.

Method 2. Remote sessions must include the element “password” (see below). If the user name password pair (from the Linux passwd database) do not match the transaction will not be processed.

All transactions are logged in /var/log/ubtransaction/ubtp.log and the details in matching log files – /var/log/ubtransaction/ubtp.<transaction>.

If sendmail is running on the server, /usr/bin/ubtransaction.smrsh is linked to /etc/smrsh/ubtransaction allowing remote transactions to be delivered to ubtransaction@<server>. An entry is also put into /etc/aliases. To disable this feature, remove both the alias entry and the link in /etc/smrsh. For postfix, only the /etc/aliases entry is required.


Add records to a table. Currently only the “attribute,value” format is supported. This can be specified in two ways: using the attribute element or using an element with the name of the attribute. NB The latter only works if there are no special characters in the attribute name (allowed by Unibase but not XML).

<add table=”…”>


<attribute name=”…”>attribute value</attribute>

<attribute name>attribute value</attribute name>




Return records from the database using a specfied format.

<data table=”…”>

{<key>table key</key>}
{<match>index match</match>}
<format>layout format</format></data>


Delete records from a table.

NOTE: The matching index value is optional and if omitted, the entire table contents will be deleted.

<delete table=”…”>

{<key>table key</key>}
{<match>index match</match>}


Execute a system command.

NOTE: ubreport is a command interpreter, as are many other UNIBASE commands. However only ubreport in non-interactive mode is sensible. Other interpreters such as perl and tcl are also suitable. The default is sh (bash).


<command interpreter=”…”>

command text

{<argument>argument value</argument>}

{<input>input stream</input>}


Wrapper for a transaction set.

This is the wrapper for this transaction set.

<transaction {sessionid=”…”} {application=”…” {directory=”…”}}>

<sequence>system allocated sequence number</sequence>

sessionid is a unibase session and defines the application, operational directory, and user.


Update attribute values in a record.

The key and match value for the record to be updated can be specified as attributes of the update element or as separate elements within the update.

Updates can be generic – value; or domain specific – date, number, text.

<update table=”…” {key=”…”} {match=”…”}>

{<key>table key</key>}
{<match>index value</match>}
{<date attr=”…”>…</date>}
{<number attr=”…”>…</number>}
{<text attr=”…”>…</text>}
{<value>update command</value>}




Leave a Reply