----------------------------------------------------------------------

ELOQUENCE B.07.00 - patch 0411080

----------------------------------------------------------------------

This patch fixes a defect of the image3k TurboIMAGE compatibility
extension as released with Eloquence B.07.00. This patch will be
integrated in the Eloquence B.07.00 release.

Eloquence B.07.00 must be installed before applying this patch.

Severity:
 PE70-0411080: BUG FIX, ENHANCEMENT
 PE70-0406220: BUG FIX
 PE70-0406120: ENHANCEMENT
 PE70-0406020: ENHANCEMENT
 PE70-0312100: BUG FIX
 PE70-0311181: ENHANCEMENT
 PE70-0311060: BUG FIX
 PE70-0308010: BUG FIX
 PE70-0307100: ENHANCEMENT
 PE70-0307060: BUG FIX
 PE70-0305260: BUG FIX
 PE70-0304300: ENHANCEMENT
 PE70-0304090: BUG FIX


Patch PE70-0411080
------------------

* The DBOPEN call has been enhanced to check for an environment
  variable that matches the database name. This environment variable 
  may be used to replace the database name. This mechanism may be used 
  to provide a replacement to MPE file equations with the image3k 
  library.

  To be effective the environment variable needs to start with the 
  prefix "EQ3K__" followed by the upshifted database name. Any dot 
  characters (.) in the database name are replaced by underscore 
  characters (_).
  
  For example:
  
    Database Name   Environment Variable
    --------------- ---------------------
    Sample          EQ3K__SAMPLE
    sample.test     EQ3K__SAMPLE_TEST

* The EQ3K_MINCAPACITY environment variable may be used to specify a 
  minimum value for capacity returned by DBINFO calls mode 202 and 205.

* The change in image3k patch PE70-0406020 to support an offset of
  10000 for TPI items caused an ambiguity on little endian platforms
  (Linux and Windows). On these platforms the image3k library could no 
  longer distinguish if an item number or name was passed. This could
  result in status -52 returned from DBFIND.
  To solve this abiguity and still support the concept to have a
  mininum value for a TPI item number we have changed the offset for
  TPI item numbers from 10000 to 5000 on Linux and Windows.

  Any application that relies on TPI items having numbers above 10000
  needs to be changed to use an offset of 5000 on little endian
  platforms. The HP-UX version of the image3k currently retains an
  offset of 10000 for TPI item numbers for full backwards compatibility.
  
* The image3k library version was changed to B.07.00.21


Patch PE70-0406220
------------------

* Platforms: All

* If DBOPEN returns status -1 also return 0 in the second and 52 in 
  the third status element. MPE applications may expect an FOPEN status
  code returned in the third status element and 52 is the equivalent 
  of file not found.

* The image3k library version has been changed to B.07.00.20


Notes / Related patches:

- Patch PE70-0406010 (eloqdb library) or newer fixes a problem in 
  the image3k DBINFO mode 301. If not installed, the sort item is not 
  returned with DBINFO mode 301 if a master set is passed as qualifier.

- On the Windows platform, patch PE70-0406021 (eloqdb library) or 
  newer must be installed instead of PE70-0406010. Otherwise loading 
  the image3k library will fail due to undefined externals.

- For use of the TurboIMAGE btree modes the eloqdb6 patch PE70-0401160 
  (or newer) should be be installed.


Patch PE70-0406120
------------------

* Platforms: All

* DBINFO TPI mode 812 has been modified to return a value of 1 in
  the result buffer word 12 in case the passed qualifier specifies
  a "composite" index.
  Previous image3k versions returned 0 which is inconsistent with 
  IMAGE TPI conventions.

* Processing of items lists has been improved if the same item list 
  is already used. We do recommend to consider using an item list 
  of "*;" in this case is as it is more efficient.

* The image3k library version has been changed to B.07.00.19


Notes / Related patches:

- Patch PE70-0406010 (eloqdb library) fixes a problem in the image3k 
  DBINFO mode 301. If not installed, the sort item is not returned 
  with DBINFO mode 301 if a master set is passed as qualifier.

- On the Windows platform, patch PE70-0406021 (eloqdb library) or 
  newer must be installed instead of PE70-0406010. Otherwise loading 
  the image3k library will fail due to undefined externals.

- For use of the TurboIMAGE btree modes the eloqdb6 patch PE70-0401160 
  (or newer) should be be installed.


Patch PE70-0406020
------------------

Platforms: All

* The TPI related DBINFO modes have been modified to accept and 
  return item numbers greater than 10000 in case an item is a
  TPI item. This is specified in the TPI documentation and solves 
  potential compatibility issues in case applications specifically 
  check for this item number range. Eloquence simply adds 10000
  to the index item number.

* DBOPEN has been corrected to return status -1 if the database 
  could not be opened. In previous image3k versions could return 
  status -11 if the database did not exist.

* DBLOCK returns a status code 26 in case a deadlock situation
  was detected. With previous image3k versions DBLOCK returned 
  a status code -35. 
  Status code 26 is specified by te TurboIMAGE documentation.

  Please note that other intrisic calls that modifiy the database
  could still return status -35 in case a deadlock situation is
  encounted.

* DBINFO modes 811 and 812 have been modified to accept IMAGE 
  data items in addition to index items. Previous versions only 
  accepted index items and returned a status when a data item 
  was specified.

* Added support for HP Fortran 90 using the +ppu compile option
  in HP-UX. When the +ppu compile option is used, an underline 
  character is added to all external symbols (e.g. dbget becomes
  dbget_).

* Added support for the DBMAINT intrinsic call. The DBMAINT call 
  is undocumented on MPE may be used to create or erase a database.
  The Eloquence implementation in addition supports purging of 
  a database.

  The DBMAINT arguments are similar to DBOPEN:

    DBMAINT (base,password,mode,status)

    base
      is the name of an integer array containing a string of ASCII 
      characters. The string must consist of two blanks followed 
      by a left-justified database name and terminated by a semicolon, 
      a space or a NUL character, for example, "  ORDERS;".
 
    password
      is the name of an integer array containing a left-justified 
      string of ASCII characters consisting of an optional password 
      followed by an optional user identifier.

      The following constructs are valid for the password and user 
      identifier (a _ represents a blank):

        password [{_;}[/USERIDENT{_;}]]
   
        [/USERIDENT]{_;}          Provides user name and empty password
        ;[/USERIDENT{_;}]         Same
        password[/USERIDENT]{_;}  Specifies user name and password

      The password or the user identifier string must be terminated 
      by a semicolon, space or NUL character. Since Eloquence does 
      not assume a fixed length, a termination character should 
      alsways be present.

      Unless the password and the user identifier string is present, 
      the password argument is ignored.

    mode
       is an integer equal to 1, 2, or 4 indicating the type of 
       operation requested.

       1 - create the database
       2 - erase the database.
       4 - purge the database (Eloquence specific)

    status
      is the name of an array of 10 halfwords in which the database 
      returns status information about the procedure.

  DBMAINT requires exclusive access to the database and affects all 
  sets of a database. The Eloquence dbcreate, dberase and dbpurge
  utility programs also allow to specify a list of data sets.

  Eloquence either requires the user has administrative access to the
  database (eg. it is member of the "dba" group) or has the erase 
  privilege (in case of mode 4).

* The image3k library version has been changed to B.07.00.18


Notes / Related patches:

- Patch PE70-0406010 (eloqdb library) fixes a problem in the image3k 
  DBINFO mode 301. If not installed, the sort item is not returned 
  with DBINFO mode 301 if a master set is passed as qualifier.

- On the Windows platform, patch PE70-0406021 (eloqdb library) or 
  newer must be installed instead of PE70-0406010. Otherwise loading 
  the image3k library will fail due to undefined externals.
  The DBMAINT intrinsic requires that additional functions are 
  exported from the Eloquence client library.

- For use of the TurboIMAGE btree modes the eloqdb6 patch PE70-0401160 
  (or newer) should be be installed.


Patch PE70-0312100
------------------

Platforms: All

* DBFIND status return could be inconsistent with the documentation.
  DBFIND has been modified to return a chain count of 2^32-1 entries
  in modes 21/24. DBFIND modes 1/4 on master sets now return zero 
  as the forward/previous pointers.
  DBFIND TPI modes 22 and 1xx to 5xx return 1 as the chain count.

* DBFIND TPI modes may also be used to access search items (equivalent
  to the TurboIMAGE btree modes).
  
* DBFIND mode 4/24 has been modified to return status codes -429, -430, 
  -431, -432 and -446 in case the specified argument was not correct. 
  Previously DBFIND mode 4/24 returned status -258 which is 
  inconsistent with TurboIMAGE.

* DBINFO modes 811,812,814,833 could write debug messages
  to stderr. Some debug code was left active in DBFIND and
  has been de-activated.

* The DBUPDATE mode 1 status array could be inconsistent with
  TurboIMAGE in case a CIUPDATE operation failed (for example due 
  to a missing chain head). In this case, DBUPDATE returned status 
  code 1xx in the first status element.
  The TurboIMAGE documentation specifies that in case of a failed 
  CIUPDATE operation additional status information is returned in 
  status element 3.

  DBUPDATE mode 1 has been modified to return status 41 and return
  additional information in status element 3.  
  DBUPDATE mode 2 (which is equivalent to DBUPDATE mode 1 with the
  CIUPDATE flag set) has been changed accordingly.

* DBLOCK modes 3/4/13/14 have been modified to support the "@" qualifier
  to specify an effective database lock. This is supported by TurboIMAGE 
  but was not possible with Eloquence.

* DBUNLOCK did not support the extended Eloquence modes to allow
  selective unlock. DBUNLOCK has been modified to follow the Eloquence
  documentation.

* Fixed a PROBLEM with DBFIND TPI mode 1/21 on an index with compound 
  keys. The argument was not parsed correctly, possibly omitting part 
  of the specified lookup value if more than two segments were present.

* The image3k library version has been changed to B.07.00.16

For use of the TurboIMAGE btree modes the eloqdb6 patch PE70-0312080
(or newer) must be installed.


Patch PE70-0311181
------------------

Platforms: All

* This patch enables the use of the TurboIMAGE TPI and btree modes
  with master sets. This requires installation of the eloqdb6 patch 
  PE70-0311180 (or newer).

* The image3k library version has been changed to B.07.00.15


Patch PE70-0311060
------------------

Platforms: All

* A compatibility problem with DBFIND mode 4 and 24 was fixed.
  The DBFIND was errorneously expecting "==" to be passed as 
  byte 1-2 of the structured DBFIND mode 2/24 argument to locate 
  a key with an equal value.
  However the TurboIMAGE documentation specifies "= " to be used. 
  The DBFIND call has been changed accordingly.

* Specifying an invalid argument size to DBFIND mode 4/24 could 
  cause an internal image3k library error:
  assertion failed: used_sz + size <= HP3K_MAX_BUFFER
  DBFIND has been modified to return a status -258 (invalid argument)
  in this case.

* A compatibility problem with TPI DBFIND mode 1 and 21 was 
  fixed when a trailing space was used before the @ wildcard 
  character. DBFIND errorneously handled this as a special case.
  It filled the remaining key with spaces and did not perform
  a wildcard search. DBFIND has been changed to no longer
  consider this a special case.

* A compatibility problem with TPI DBFIND mode 1 and 21 with 
  numeric values has been fixed. DBFIND mode 1/21 was handling 
  numeric arguments on an index incorrectly. 

  DBFIND was expecting that numeric values are passed as text and 
  converted it to the binary representation. However the TPI
  documentation defines that numeric values should be passed as
  a binary value.
  DBFIND mode 1/21 on indexes has been changed to follow the TPI 
  documentation.
  
  The HP3K_TPI_COMPAT property may be used to enable the previous 
  behavior. If the bit 1 in the HP3K_TPI_COMPAT property value
  is set (+2) then a numeric argument may be passed as text if the 
  argument either starts with an operator (==, <=, >=), a positive 
  or the negative sign. Otherwise a binary value is assumed.
  As this may cause ambiguities, the default is that numeric values
  must be passed as a binary value.

  Setting this property can be done with the dbutil utility either 
  interactively or using the following script:
  --- snip ---
  database "<database_name>";
  create property "HP3K_TPI_COMPAT"
   value "2";
  --- snip ---
  
* The image3k library version has been changed to B.07.00.14


Patch PE70-0308010
------------------

Platforms: All

* The DBEXPLAIN and DBERROR calls did not return a message for
  status codes 10 and 14 (#2088)

* A problem with DBERROR and DBEXPLAIN was fixed. In case an
  Eloquence call failed in some cases the message did not 
  properly reflect the IMAGE intrinsic call.

* The encoding of the status array has been modified in case an
  Eloquence call fails. In case a nonzero status is returned the
  status array is used as below:

  Element Description
  ------- ------------------------------------
   1      IMAGE status code
   2 - 4  unchanged
   5      zero
   6      IMAGE intrinsic ID
   7      Eloquence status code
   8      Eloquence extended status code
   9      IMAGE mode
   10     Encoded Eloquence call ID and mode
          (Format: 6 bit id, 10 bit mode)

* DBLOCK could return wrong status codes. A wrong status code was 
  returned instead of status -128 and -126.

* The IMAGE3K library has been modified to consistently return 
  status -105 in case a memory allocation failed.

* The image3k library version has been changed to B.07.00.13


Patch PE70-0307100
------------------

Platforms: All

* The Eloquence DBFIND mode 1/21 index handling has been enhanced 
  with the option to handle TPI and TurboIMAGE btree search arguments 
  more similar (#2032).

  TurboIMAGE btree indexes and TPI indexes use slightly different
  conventions in the DBFIND mode 1/21 search argument. 
  With TurboIMAGE btree indexes the wildcard character can be 
  configured through DBCONTROL or dbutil. For TPI indexes a "@" 
  character is used. TPI also considers a space character before 
  the "@" wildcard to be special.
  
  The IMAGE btree functions are currently not enabled in Eloquence
  and Eloquence indexes are used used as a replacement. However 
  Eloquence indexes follow the TPI conventions which could cause 
  problems with applications relying on the IMAGE btree behavior. 
  As Eloquence allows to use all TurboIMAGE DBFIND modes, 
  independendly of the index type, this option allows DBFIND mode
  1/21 calls to work more closely.

  The HP3K_TPI_COMPAT database property can be used to cause
  Eloquence indexes to follow the TurboIMAGE btree behavior
  more closely. If HP3K_TPI_COMPAT is set to nonzero it causes 
  TPI indexes to use the current IMAGE btree wildcard character 
  and not handle trailing spaces as a special case. The default
  value is zero which implements the previous behavior.
  Setting this property can be done with the dbutil utility either 
  interactively or using the following script:
  --- snip ---
  database "<database_name>";
  create property "HP3K_TPI_COMPAT"
   value "1";
  --- snip ---
  This property is currently not available in the dbutil TurboIMAGE 
  property dialog.

* DBCONTROL mode 5 and 6 return status -82 is CIUPDATE is DISALLOWED.

* Fixed NULL pointer access with DBINFO mode 814. This could cause 
  a crash on platforms other than HP-UX.

* DBXBEGIN, DBXEND and DBXUNDO could cause an internal failure when 
  called before any database was opened. Status -11 is now returned
  instead of aborting the application.

* Implemented the undocumented DBVERSION intrinsic. The DBVERSION
  intrinsic result follows the MPE format and returns the following 
  NUL terminated string:
   MPE/iX:     "HP30391 C.1005"
   Eloquence : "IMAGE3K B.0700.12"

* The DBOPEN call returns 1 in the status element 4. With TurboIMAGE
  this is the size of the DBU area in half words. This has no meaning
  with Eloquence but a nonzero value is used by some applications to 
  distinguish between HP IMAGE and TurboIMAGE.

* Mode 0 has been added to all database calls. On MPE this may used to
  obtain version information about a TurboIMAGE intrinsic call (eg.
  QUERY/3000 version command). Eloquence returns status -31 (invalid
  mode) but status elements 2 to 4 return the Eloquence image3k 
  library version (w/o the patch level, for example B.07.00).
  It is recommended to use DBINFO mode 801 (or DBVERSION) to obtain
  the TurboIMAGE version.

* The image3k library version has been changed to B.07.00.12


Patch PE70-0307060
------------------

Platforms: All

* DBUPDATE returned status -82 instead of status 41 in case 
  a critical item was changed but critical item update was 
  not enabled (#2010)
  While status -82 is specified in the TurboIMAGE documentation
  for DBUPDFATE it is not used with DBUPDATE.

* The image3k library version has been changed to B.07.00.11


Patch PE70-0305260
------------------

Platforms: All

* DBINFO mode 833 returned information indicating that Eloquence 
  indexes are case sensitive. (#1977)
  Case sensitive indexes are currently not supported with Eloquence. 
  The information has been corrected.

* DBFIND mode 11/22 terminated with an internal error (#1978)

    assertion failed: arg_sz >= 0
    file hp3k_tpi.c, line 112

  This problem was caused by a wrong consistency check.

* The image3k library version has been changed to B.07.00.10


Patch PE70-0304090
------------------

Platforms: All

* DBFIND should set status elements 2-4 to zero if the call 
  returns a status code (#1935).

  Eloquence only set the status elements 2-4 to zero when the
  call succeeded. This behavior is slightly different from
  TurboIMAGE which sets the status elements 2-4 to zero even
  if the call returns with a nonzero status. This difference 
  might cause problems for applications which rely on the 
  TurboIMAGE behavior.

* A corresponsing change was made to the DBDELETE call to set
  status element 2 to zero even if the call returns with a 
  nonzero status code.

* The image3k library version has been changed to B.07.00.09


Patch PE70-0304090
------------------

Platforms: All

* DBFIND modes 1/21 could fail with database status -21 when a
  wildcard character is present (and the btreemode1 flag is
  enabled).

  This problem was caused by a wrong mapping of the data set flags
  uploaded by the database server when opening the database (#1901).
  It was only uncovered by a fix to DBFIND related to btreemode1
  before the B.07.00 release, so it was not exposed in the B.07.00 
  pre-releases.

  The Eloquence image3k library makes use of these dataset flags 
  to determine if the /indexed flag is set for a data set.
  Currently the server process does not enable the /indexed flag
  but the image3k library assumed it was available. As a consequense
  the server process causes the DBFIND to fail with status -21.

* The image3k library version has been changed to B.07.00.08

** REVISION 02 **

* A bug was fixed in an internal function that is commonly used
  to check call argument alignment. This has resulted in wrong
  behavior in some IMAGE calls (eg. DBGET with saved item lists).
  This is defect was corrected in the original patch but not 
  documented.


Installation:
-------------

UNIX:

In order to install this patch, you need to unpack it with gzip.
Gzip is included with HP-UX and Linux.
Installation requires root privileges.

cd /opt/eloquence6
gzip -dc /path/to/PE70-0411080-hpux.tar.gz | tar xf -

Files:

  Linux:
   lib/libimage3k.so
   lib/libimage3k.a
   include/image3k.h
   share/doc/PE70-0411080-README

  HP-UX:
   lib/pa11_32/libimage3k.sl (HP-UX PA-RISC 1.1 32bit)
   lib/pa11_32/libimage3k.a
   lib/pa20_32/libimage3k.sl (HP-UX PA-RISC 2.0 32bit)
   lib/pa20_32/libimage3k.a
   lib/pa20_64/libimage3k.sl (HP-UX PA-RISC 2.0 64bit)
   lib/pa20_64/libimage3k.a
   lib/hpux32/libimage3k.sl  (HP-UX Itanium 32bit)
   lib/hpux32/libimage3k.a
   lib/hpux64/libimage3k.sl  (HP-UX Itanium 64bit)
   lib/hpux64/libimage3k.a
   include/image3k.h
   share/doc/PE70-0411080-README


Windows:

Download the PE70-0411080-win32.zip file and unpack its contents
with WinZip or PKUNZIP.
Installation requires administrative capabilities.

Please copy the .dll files into the WINDOWS SYSTEM DIRECTORY
(for example C:\Windows\System32).

Please copy the .lib and .def files into the lib subdirectory of
your Eloquence installation (for example C:\Programs\Eloquence\lib).

Please copy the image3k.h file into the include subdirectory of your
Eloquence installation (for example C:\Programs\Eloquence\include).

Please copy the PE70-0411080-README.txt file into the share\doc
subdirectory of your Eloquence installation (for example
C:\Programs\Eloquence\share\doc).

Files:

   image3k.dll
   image3kC.dll
   image3k.lib
   image3kC.lib
   libimage3k.lib
   image3k.def
   image3kC.def
   image3k.h
   PE70-0411080-README.txt