OPRB - Database Open/Close Processing

#### Search Results

Search

# OPRB - Database Open/Close Processing

This Natural profile parameter controls the use of the Adabas C open/close commands during a Natural session.

Possible settings | `OFF` | If the `OPRB` parameter is set to `OFF`, a Natural session starts with an Adabas `OP` command requesting `UPD` (access/update) to the Natural system file. Natural also issues `RELEASE CID` (Adabas RC) commands to release all ISN lists (ISN lists specified in a `RETAIN` clause of a Natural `FIND` statement are not released).
`OPRB=(string)` | You can specify an open request in accordance with the syntax described below. See also the examples listed.
Default setting | `OFF` |
Dynamic specification | no |
Specification within session | no |

This Natural profile parameter is required if any of the following conditions is true:

- An explicit list of Adabas files to be accessed/updated is to be provided. This is necessary, for example, if Adabas cluster updating or exclusive file control is to be requested.

- The Adabas record buffer to be used with the initial Adabas `OP` command can be explicitly provided. To access databases you have to specify the DBIDs and file numbers with their corresponding access rights at the `OPRB` string.

- The character set for Adabas format W is to be provided. To access databases you have to specify the DBIDs and the required encoding name.

Entries may not contain blanks, must be enclosed in parenthesis and must follow the rules defined in the relevant Adabas documentation.

In addition to the Adabas syntax, internal file numbers can be specified by using the x-y notation (that is, all numbers between x and y).

## OPRB String Syntax

`DBID=(x)` specifies the database for the following access right entries:

`ACC=(file-list)` | Specifies access permission (read) for the files in the file list.
`UPD=(file-list)` | Specifies update permission (read/write) for the files in the file list.
`EXU=(file-list)` | Specifies exclusive update permission (exclusive read/write) for the files in the file list.
`WCODE=encoding` | Specifies the encoding for W fields in the Adabas user session (Adabas for Mainframes). Required encoding code for Adabas on Mainframes is 4095.
`WCHARSET=charset` | Specifies the default character set used for W fields in record and value buffers in the Adabas user session (Adabas for Linux and Windows). Required encoding names for Adabas on Linux and Windows are: `UTF-16LE` (for little-endian machines) `UTF-16BE` (for big-endian machines) `UTF-16` (`ADALNK` decides whether to use `LE` or `BE`)

The trailing record buffer dot (.) can be omitted in the `OPRB` string because it is appended automatically.

`DBID=0` specifies the default record buffer entry and can be omitted if it is the first DBID listed in the `OPRB` string. This default record buffer is taken if there is no specific entry for the requested database.

Combinations of the keywords `ACC`, `UPD`, `EXU` and `WCODE` or `WCHARSET` must follow the rules as defined in the relevant Adabas documentation. Natural issues an `OP` command at the start of a Natural session and a `CL` command at the end of the session. At the end of a Natural program, only the required `RC` commands are issued to release held ISN lists.

#### Example 1:

    (ACC=2,3,4,DBID=15,UPD=3,4,ACC=5)

The following entries were defined:

    'UPD=3,4,ACC=5.' for DB 15
    'ACC=2,3,4.' for other databases (DB 0)

#### Example 2:

    (DBID=15,ACC=2-7)

The following entry was defined:

    'ACC=2,3,4,5,6,7.' for DB 15; access to other databases is not permitted

#### Example 3:

    (DBID=0,ACC=2,3,4,5.)

The following entry was defined:

    'ACC=2,3,4,5.' for all databases (DB 0)

Note
If you have Natural Security installed, open/close processing works the same way as without Natural Security; the `OPRB` parameter in the security profile is provided for future use only.

#### Example 4:

    (DBID=0,ACC=2,3,4,5,DBID=12,WCHARSET='UTF-16LE',UPD=3-10)

The following entries were defined:

    'ACC=2,3,4,5.' for all databases (DB 0)

    WCHARSET='UTF-16LE',UPD=3,4,5,6,7,8,9,10. for DB 12