.
Eloquence B.07.10 contact contact


DBPUT

 
.
  Adds new entries to a manual master or detail data set. The database must be opened in write mode.
DBPUT(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.

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; names or numbers. The new entry contains values supplied in the buffer array for data items in the list array. Search or sort items defined for the entry must be included in the list array. Fields of unreferenced items are filled with binary zeros.

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

 ACCOUNT,LAST-NAME,CITY,STATE;
When referencing by number, the first halfword of the list array is an integer n that is followed by n single positive integers identifying unique data item numbers. Example: 4 1 10 3 16 lists for the four data item numbers 1, 10, 3, and 16.

The list specifies data items for which values are supplied in the buffer array, and is saved internally by TurboIMAGE as the current list for the 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. 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. Be sure a current list exists before using the asterisk construct, or a null list is assumed.

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.


Special List Parameter Constructs:

Construct list Array Contents Purpose
Empty 0; or 0_ or _ (0 must be ASCII) Request no data transfer.
Empty Numeric 0 (n, length of data item identifier list, is zero) Request no data transfer.
Asterisk *; or *_ Request procedure to use previous list and apply it to same data set. If "*" is used to define the list in the first call to DBGET and DBPUT it is treated as a zero.
At-sign @; or @_ Request procedure to use all data items of the data set in the order of their occurrence in the entry.
Note: _ indicates a space character.


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.


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