HP Eloquence A.06.00 Release Notes

HP Eloquence Language Enhancements

[Part 1] [Part 2] [Part 3]


New data base statements

HP Eloquence A.06.00 can operate on HP Eloquence A.05.xx and A.06.00 data bases. The HP Eloquence programming language has been enhanced to allow access to the new data base functionality.

Opening a database

HP Eloquence A.06.00 uses client/server model to connect to a data base server. Since the data base server can run on a different machine and there could be more than one server on a machine, the DBOPEN syntax has been extended to accomplish this.

The DBOPEN statement uses a database specification, which consists of three terms:

The syntax is as below:
   [[server][:service]/][Database]
server
The name or IP number of the system running the database server. If it is omitted, the local system is assumed.
service
The service name or port number of the data base server. If it is omitted, the default service name "eloqdb" is assumed.
database
The database name. For HP Eloquence A.05.xx databases, this is the absolute path. For HP Eloquence A.06.xx, this is simply the data base name. Please note, that the data base name is not case sensitive.
For example:
   Db$="  sampledb"
   DBOPEN(Db$,"",1,S(*))
This opens the database sampledb on the local system, using the default service.
   Db$="  server/sampledb"
This would connect the default data base server running on the system named "server".
   Db$="  server:eloqdb5/path/to/sampledb"
This would connect the default data base server, running on the system named "server" using the port associated with the service name "eloqdb5". For HP Eloquence A.05.xx compatible databases, it is required to specify an absolute path.

All the connection details could be hidden in a VOLUME definition. If a volume DBVOL is defined as below (for example in your .eloqrc file)

   DBVOL="server:eloqdb5/path/to"
then the code below
   Db$="  sampledb,DBVOL"
would connect to data base server:eloqdb5/path/to/sampledb.

Authorization

The new HP Eloquence A.06.00 data base provides a new authorization scheme. A list of users is maintained per data base server. For each data base, there are authorization groups which have specific rights on this particular data base. A user can be a member of up to eight authorization groups.

The DBLOGON statement is used to provide authorization data which are transmitted to the data base server, when a data base is openend. The HP Eloquence A.06.00 data base no longer uses data base passwords. For HP Eloquence A.05.xx data bases, the logon information is ignored.

Syntax:

   DBLOGON(User$,Pswd$)
Description:
User$
A string variable containing the user name, for example "fred".
Pswd$
A string variable containing the password for the given user, for example "secret".
When no DBLOGON statement is executed before opening a data base, the data base server will try to access the data base as user "public" and an empty password.

For example:

   User$="fred"
   Pswd$="secret"
   DBLOGON(User$,Pswd$)
   ...
   DBOPEN(Db$,"",1,S(*))

Transactions

The new HP Eloquence A.06.00 data base provides transactions. Transactions are used to ensure data base integrity. After a DBBEGIN statement, data base modifications are no longer stored permanently in the data base. A subsequent DBCOMMIT statement is required to make any pending operations permanent in the database. The DBROLLBACK statement provides a rollback operation, that reverts pending database operations. After a successful (top level) commit, the transaction is guaranteed to be present in the data base, even in case of a server crash. So it can be guaranteed, that either all dependend operations are saved entirely or no modifications are done.

Pending data base changes are neither visible to other users nor can they be changed concurrently. All pending data base records are locked automatically by the data base server and any attempt to modify them will cause the concurrent task to become paused.

Transactions can be nested. The DBCOMMIT or DBROLLBACK statements usually operate on the last (sub-) transaction. Data base modifications are not stored permanently in the data base, until a top level DBCOMMIT is executed. The DBROLLBACK statement can be used to undo all pending modifications until a specific checkpoint.

Please note, that the transaction handling statements do not operate on a particular data base. Instead they operate on all data bases at once. A pending commit or rollback is even performed after closing the data base. In case a data base server connection is lost (for example, because the server has been killed), all pending modifications on all data bases are automatically reverted.

The DBBEGIN statement

The DBBEGIN statement begins a new (sub-) transaction. When this is the first transaction, it is called top level transaction. No modifications are permanently saved in the HP Eloquence A.06.00 data base until the top level transaction is committed. A subsequent DBBEGIN begins a new subtransaction, which can be controlled separately with the DBCOMMIT and DBROLLBACK statements.

Syntax:

   DBBEGIN(Comment$,Mode,Status(*))
Description:
Comment$
An arbitrary comment, which is logged on the server.
Mode
ModeDescription
1Begin transaction
Status(*)
The status array. On success, the following elements are defined:
ElementDescription
1Completion code
2Transaction ID
3Transaction nesting level
Up to 20 transactions can be nested. Each DBBEGIN statement returns a unique (process specific) transaction id, which can be used with the DBROLLBACK statement to revert all modifications until this state.

The DBCOMMIT statement

The DBCOMMIT statement commits a transaction. If this is a top level transaction, modifications are made permanently in the data base. If a subtransaction is committed, it becomes part of its parent transaction.

Syntax:

   DBCOMMIT(Mode,Status(*))
Description:
Mode
ModeDescription
1Commit current (sub-)transaction
2Commit top level transaction
Status(*)
The status array. On success, the following elements are defined:
ElementDescription
1Completion code

The DBROLLBACK statement

The DBROLLBACK statement is used to undo a pending transaction. If this is a top level transaction, all pending modifications are reverted. If applied to a subtransaction all modifications including the enclosing DBBEGIN statement are reverted.

Syntax:

   DBROLLBACK(Id,Mode,Status(*))
Description:
Id
Transactions id, used with mode 2.
Mode
ModeDescription
1Rollback current (sub-)transaction
2Rollback given transaction
3Rollback top level transaction
Status(*)
The status array. On success, the following elements are defined:
ElementDescription
1Completion code
3Transaction nesting level
In Mode 2, a transaction id must be specified which was obtained from DBBEGIN. This can be used to revert up to a specific checkpoint.

The DBEXPLAIN$ function

The DBEXPLAIN$ function translates the given status into a descriptive message.
   X$=DBEXPLAIN$(Status(*))
   X$=DBEXPLAIN$(n)

New status codes

The following data base status codes are new to A.06.00:
StatusDescription
-3User name not recognized
-4User password does not match
32Transaction nesting exceeds maximum
33No transaction active
-801Volume operation failed
-802Node related failure
-803FIXREC related problem
-804BTREE related problem
-805System catalog operation failed
-806System operation failed

Status codes -801 to -806 usually indicate internal problems. In this case, the status element 10 provides more detailed information.

With the HP Eloquence A.06.00 database, the following status codes can no longer happen:
-94Database may be corrupt
-96Corrupt pointer value detected
94Corrupt data base openend in mode 8


Obsolete data base statements

The following statements are currently not supported with HP Eloquence A.06.00. However, we consider to re-implement them in a subsequent release for the new data base.

The following statements are no longer supported with HP Eloquence A.06.00.


© Copyright 1998 Hewlett-Packard GmbH. All rights reserved.
Revision: 98/02/16