.
Eloquence B.07.10 contact contact


DBGET

 
.
 
DBGET(base,dset,mode,status,list,buffer,argument)
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
contains an integer between 1 and 8, inclusive, which indicates the reading method. The methods are:

Mode Method
1 Re-read. Read the entry at the internally maintained current record number (argument parameter is ignored).
2 Serial Read. Read the first entry whose record number is greater than the internally maintained current number (argument parameter is ignored).
3 Backward Serial Read. Read the first entry whose record number is less than the internally maintained current number (argument parameter is ignored).
4 Directed Read. Read the entry, if it exists, at the record number specified in the argument parameter (argument is treated as a 32-bit record number).
5 Chained Read or Next Qualified Entry Read. Read the next entry in the current chain, or read the next qualified entry for a B-Tree DBFIND. This is the entry referenced by the internally maintained forward pointer (argument parameter is ignored). Super-chains are traversed for detail data sets.
6 Backward Chained Read. Read the previous entry in the current chain, or the previous qualified entry for a B-Tree DBFIND. This is the entry referenced by the internally maintained backward pointer (argument parameter is ignored). Super-chains are traversed for detail data sets.
7 Calculated Read. (Master data sets only.) Read the entry with a key item value that matches the value specified in argument. The entry is in the master data set specified by dset.
8 Primary Calculated Read. (Master data sets only.) Read the entry occupying the primary address of a synonym chain using the key item value specified in argument to locate the entry. The key item value returned is always that of the primary entry and might not match the value specified in argument. (Refer to chapter 10 for synonym chain description.)
With Eloquence this is identical to mode 7.

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.


Notes:

  • Synonym chain information (for master data set) is always zero.
  • Mode 8 is the same as mode 7
  • Additional modes 15 and 16 are available


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  2006-01-24  
  Copyright © 2006 Marxmeier Software AG