.
Eloquence B.07.10 contact contact


DBUPDATE

 
.
  Modifies values of data items in the entry residing at the current record address of a specified data set. The database must be opened in write mode. The update is always carried out correctly against the latest version of the data, regardless of modifications made by other users.

You can use DBUPDATE to modify the values of detail data set search and sort items if permitted by the critical item update (CIUPDATE) option settings or using mode 2. This includes master data set key item values if no detail is connected.

DBUPDATE(base,dset,mode,status,list,buffer)
base
is the name of an array used as the base parameter when opening the database. The first element of the array must contain the base ID returned by DBOPEN. (Refer to DBOPEN for more information about the base ID.)

dset
is the name of an array containing the left-justified name of the data set to which the entry is to be added, or is an integer referencing the data set by number. The data set name can be up to 16 characters long. If shorter, it must be terminated by a semicolon, a space or the NUL character.

mode
must be an integer equal to 1 or 2.

status
is the name of an array of 10 halfwords in which the database returns status information about the procedure. If the procedure executes successfully, the status array contents are:

Element Contents
1 If the procedure succeeds, the return status is 0. Otherwise it provides a status code to describe the failure.
2 Length of logical entry in buffer array (in halfwords).
3-4 Word record number of new entry (32 bit).
5-6 Word count of number of entries in chain (32 bit). If detail data set, chain is current chain of new entry.
7-8 If detail, word record number of predecessor on current detail chain (32 bit).
9-10 If detail, word record number of successor on current detail chain (32 bit).

list
is the name of an array containing an ordered set of data item identifiers, either names or numbers. Values supplied in the buffer array replace the values of data items occupying the same relative position in the list array. The user class established when the database is opened must allow at least read access to all the items included in the list array.

The list array can contain a left-justified set of data item names, separated by commas and terminated by a semicolon or a blank. No embedded blanks are allowed and no name can appear more than once.

When referencing by number, the first element of the list array is an integer n followed by n unique data item numbers (one-halfword positive integers).

The list not only specifies the data items to be updated immediately but is saved internally as the current list for this data set. The current list is unchanged until a different list is specified in a subsequent call to DBGET, DBPUT, or DBUPDATE for the same access path and data set.

Some special list constructs are allowed. These are described in Special List Parameter Constructs with the DBPUT procedure. List processing involves some overhead which can be shortened in subsequent calls by using the asterisk construct to specify that the current list is to be used.

buffer
is the name of an array containing data item values to be added. The values must be in the same order as their data item identifiers in the list array. The number of halfwords for each value must correspond to the number of halfwords required by its type multiplied by the sub-item count. Search and sort item values can be included in this update list if their values will not change unless mode 2 is used or the CIUPDATE flag is set.


Notes:

  • With the Eloquence database, locking is optional. A write attempt which is covered by a concurrent DBLOCK returns status -12.

  • Synonym chain information (for master data set) is always zero.

  • Additional mode 2 is available which has the same effect as if CIUPDATE is set.


 
 
 
  Privacy | GDPR / DSGVO | Webmaster | Terms of use | Impressum Revision: 2006-01-24  
  Copyright © 1995-2024 Marxmeier Software AG