HP 3000 Manuals

Using TurboIMAGE/XL Intrinsics (Cont.) [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.5 Documentation


TurboIMAGE/XL Database Management System Reference Manual

Using TurboIMAGE/XL Intrinsics (Cont.) 

DBINFO (Cont.) 

Mode 402:  ILR.   

Mode 402 returns information about Intrinsic Level Recovery (ILR).

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      1       | ILR log flag                       |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      2       | Calendar date (mmddyy)             |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     3-4      | Clock time (one word in format     |
|              | hhmmsstt)                          |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      5       | 0                                  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     6-14     | _                                  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    15-16     | Reserved                           |
|              |                                    |
-----------------------------------------------------

           If the database is enabled for ILR, the ILR log flag is 1;
           otherwise it is 0.

           The calendar date is the date ILR was enabled.

           The clock time is the time ILR was enabled.

           Element 5 is always 0.

           _ indicates blank.  Elements 6 to 14 are always blank.

           Elements 15 and 16 are reserved.

Mode 403:  Dynamic Roll-Back.   

Mode 403 obtains information related to dynamic transaction activity on a
given database.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     1-4      | Log identifier name                |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      5       | Database log flag                  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      6       | User log flag                      |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      7       | Logical transaction flag           |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     8-9      | User transaction number            |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    10-11     | XM log set size (in megabytes)     |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      12      | XM log set type                    |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      13      | Database attached flag             |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      14      | Dynamic transaction flag           |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    15-26     | XM log set name                    |
|              |                                    |
-----------------------------------------------------

           The log identifier name is left-justified and padded with
           blanks if shorter than 8 characters.

           If the database is enabled for logging, the database log flag
           is 1; otherwise it is 0.

           If you are logging, the user log flag is 1; otherwise it is 0.

           If no logical transaction is in progress, the transaction flag
           is 0.  If a static transaction is in progress, the flag is set
           to 1; if a multiple database transaction is in progress, the
           flag is set to 2.

           The user transaction number is one word.

           The Transaction Management (XM) log set is measured in
           megabytes.

           If the XM log set is circular, the log set type is CR;
           otherwise it is LN indicating a linear log.

           If the database is attached to XM, the database attached flag
           is 1; otherwise it is 0.

           If the user is processing a dynamic transaction, the dynamic
           transaction flag is 1; otherwise it is 0.

           If the database is associated with the default XM user log
           set, the XM log set name element contains blanks; otherwise it
           contains the name of the XM log set.

Mode 404:  Logging Subsystem Information.   

Mode 404 returns information about multiple database transactions.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      1       | Database log flag                  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      2       | User log flag                      |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      3       | Roll-back log flag                 |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      4       | ILR log flag                       |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      5       | MUSTRECOVER flag                   |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      6       | Database remote flag               |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      7       | Logical transaction flag           |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     8-11     | Log identifier name                |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    12-13     | Log index                          |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    14-15     | Multiple database transaction ID   |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      16      | Number of databases involved in    |
|              | the multiple database transaction  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    17-31     | Base IDs of the databases involved |
|              | in the multiple database           |
|              | transaction                        |
|              |                                    |
-----------------------------------------------------

           If the database is enabled for logging, the database log flag
           is 1; otherwise it is 0.

           If you are logging, the user log flag is set to 1; otherwise
           it is 0.  If a user accesses the database with a DBOPEN mode
           5, this flag is set to 0.

           If the database is enabled for roll-back logging, the
           roll-back log flag is set to 1; otherwise it is 0.

           If the database is enabled for ILR, the ILR log flag is set to
           1; otherwise it is 0.

           If the database is enabled for MUSTRECOVER, the MUSTRECOVER
           flag is set to 1; otherwise it is 0.

           If the database resides on a remote system, the database
           remote flag is set to 1.  If the database resides on the local
           system, the flag is set to 0.

           If no logical transaction is in progress, the transaction flag
           is set to 0.  If a static transaction is in progress, the flag
           is set to 1.  If a multiple database transaction is in
           progress, the flag is set to 2.

           The log index is used to call the WRITELOG intrinsic.  It is
           set to 0 if logging is not used.

           The transaction ID represents a multiple or single database
           transaction.

           Elements 16-31 are set when a multiple database transaction is
           in progress.
[REV BEG]

Mode 406:  Database Information.   

Mode 406 returns information about fully qualified database name and open
mode.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|     1-14     | Fully qualified database name,     |
|              | left justified, blank trailing.    |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      15      | Open mode for current DBOPEN.      |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      16      | Root file version of the database. |
|              | In the form Cn where C is          |
|              | uppercase ASCII and n is a number. |
|              | For example, C2 or C3.             |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    17-24     | For internal use.                  |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|    25-32     | Reserved.                          |
|              |                                    |
-----------------------------------------------------

[REV END]

Mode 501:  Subsystem Access.   

Mode 501 checks subsystem access to the database.  Refer to the DBUTIL
>>SHOW and >>SET commands described in chapter 8 for more information.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      1       | Subsystem access                   |
|              |                                    |
-----------------------------------------------------

           The following values are used for subsystem access:

           0       No access
           1       Read access
           3       Read/write access

Mode 502:  Critical Item Update.   

Mode 502 checks the critical item update (CIUPDATE) option settings for
the database and the current DBOPEN. The CIUPDATE option is set for the
database with the DBUTIL >>SET command and then, depending on the
setting, can be enabled or disabled with DBCONTROL for the current
DBOPEN. Refer to the discussion of DBCONTROL in this chapter and the
descriptions of the DBUTIL >>SHOW and >>SET commands in chapter 8 for
more information.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      1       | Critical item update flag          |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      2       | Current setting for accessor       |
|              |                                    |
-----------------------------------------------------

           For element 1, the following values are used for the CIUPDATE
           option setting specified with DBUTIL for the database:
           [REV BEG]

           0       Critical item update is disallowed.
           1       Critical item update is allowed (default).
           2       Critical item update is on.
           [REV END]

           For element 2, the following values are used for the current
           DBOPEN setting specified with DBCONTROL:

           0       Critical item update is disabled for this accessor.
           1       Critical item update is enabled for this accessor.

Modes 8nn:  Third-Party Indexing.   

Modes 8nn are used to return information related to third-party indexing
(TPI). If your database is enabled for TPI, refer to your vendor
documentation for additional DBINFO mode information.  The section on
DBUTIL in chapter 8 of this book has a brief description of the TPI
option.

Mode 901:  Language.   

Mode 901 obtains the Native Language attribute of the database.  It
returns the MPE/iX code for the language attribute.

Qualifier  is ignored.

Buffer     returns the following (each element is a halfword or two
           bytes):

-----------------------------------------------------
|              |                                    |
|   Element    |              Contents              |
|              |                                    |
-----------------------------------------------------
|              |                                    |
|      1       | Language ID                        |
|              |                                    |
-----------------------------------------------------

DBLOCK 

INTRINSIC NUMBER 409.   

Applies a logical lock to a database, one or more data sets, or one or
more data entries.

Syntax.   

     DBLOCK,base,qualifier,mode,status 

Parameters.   

base                  is the name of the array used for 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 base ID.)

qualifier             Modes 1 and 2:  Ignored.

                      Modes 3 and 4:  An integer variable referencing the
                      data set number or the name of an array containing
                      a data set name.  Could also be "@", when applying
                      a database lock.

                      Modes 5 and 6:  The name of the array containing
                      the lock descriptors.  The format for lock
                      descriptors is given in Figure 5-2 .

                      Use care when changing modes.  The qualifier
                      parameter can also change.

mode                  contains an integer indicating the type of locking
                      desired (refer to Table 5-15 ).

                      __________________________________________________ 

                      NOTE  If the database is open in user access mode
                            1, a lock must be in effect on either the
                            data set or the whole database when adding to
                            or deleting from master data sets.  If a data
                            entry level lock is specified, any subsequent
                            DBPUTs or DBDELETEs will fail with error
                            number -12 and the following message is
                            returned:

                                 intrinsic name CALLED WITHOUT COVERING LOCK IN EFFECT

                            Note, however, that a lock on either the
                            entire database or data set can be achieved
                            with a data entry lock when an @ sign is used
                            to specify either all data sets or all data
                            items.

                      __________________________________________________ 

status                is the name of an array of 10 halfwords in which
                      TurboIMAGE/XL 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.  Table 5-17  describes
                                 the contents of element 1 when the
                                 procedure does not succeed.

                      2          The number of lock descriptors that were
                                 successfully applied in the DBLOCK
                                 request.  For successful locks in modes
                                 1 through 4 this will be 1.

                      3          If the return status is 20, this element
                                 contains 0 if the database is locked, 1
                                 if the data set or entries are locked.

                      4          Reserved:  Contents undefined.

                      5-10       Information about the procedure call and
                                 its results.  Refer to "Library
                                 Procedure Error Messages" in appendix A
                                 for a complete description of this
                                 information.


NOTE Concurrent processes running in a process-handling environment must have MR capability if they call DBLOCK.


MPE/iX 5.5 Documentation