Version 4.2.6 for Mainframes (Update)
 —  Parameter Reference  —

OPRB - Database Open/Close Processing

This Natural profile parameter only applies to Adabas and VSAM databases.

It controls the use of database Open/Close commands during a Natural session.

The NTOPRB macro can be used as an alternative to the profile parameter OPRB in the NTPRM macro. The maximum length of an OPRB parameter specification is 256 bytes. If you require a longer specification, use the NTOPRB macro instead of the OPRB parameter.

If you wish to make OPRB specifications that are to apply to all databases, it is strongly recommended that you use the OPRB parameter in the NTPRM macro (and not an NTOPRB macro).

Possible settings OPRB=(string) With this syntax, you specify an Open request for all databases.
OPRB=(DBID=nn1,string,DBID=nn2,string, ...) With this syntax, you specify an Open request for specific individual databases. As defined in the macro NTDB, the specified DBID identifies the type of database.
OPRB=(string,DBID=nn1,string,DBID=nn2,string, ...) With this syntax, you specify an Open request for specific individual databases and also a default Open request - the initial string - which applies to all databases for which you do not specify an individual string.
OPRB=(DBID=nn1,NR=ON/OFF,string, ...) With this syntax, you specify whether Natural is to issue a restricted or a non-restricted Open request when an Adabas database is accessed for the first time. This is to enhance control for Adabas files for which exclusive update (EXU) usage is desired.
Default setting none  
Dynamic specification no  
Specification within session no  

Generally, the OPRB parameter uses one of the above syntaxes (the possible contents of the strings depend on the database system).

Instead of using the OPRB parameter, you can also use the macro NTOPRB in the Natural parameter module NATPARM.

The following topics are covered below:


Dynamic OPRB with Natural Security

A dynamically specified OPRB parameter applies for all logons to libraries in whose security profiles no OPRB parameter is specified. For a logon to a library in whose security profile the OPRB parameter is specified, any dynamically specified OPRB parameter is ignored and the one from the security profile applies.

Top of page

OPRB for VSAM

The strings which can be specified for VSAM databases are described under OPRB Parameter for VSAM Databases in the Natural for VSAM documentation.

Top of page

OPRB for Adabas

For Adabas databases, the OPRB parameter is required if either of the following conditions are true for the Natural session:

Possible content of the parameter string:

ACC=(file-list) Specifies access permission (read) for the files in the file list.
UPD=(file-list) Specifies access/update permission (read/write) for the files in the file list.
EXF=(file-list) Specifies exclusive file control: no other users may access/update the file.
EXU=(file-list) Specifies exclusive update permission (exclusive read/write) for the files in the file list.
ACODE

Specifies the option to enforce a user encoding for A fields.

Note:
The required encoding code for ACODE is derived from the current CP parameter setting of the Natural session.

WCODE

Specifies the option to enforce a user encoding for W fields.

Note:
The required encoding code for WCODE is always 4095.

ARC Defines a special data architecture for fields in the record and value buffers. This definition overrides the architecture key defined for remote calls in Entire Net-work.

For further information on these settings, refer to the description of the Adabas OP command in the Adabas Command Reference documentation.

If the OPRB parameter is omitted in the NATPARM module or OPRB=OFF is specified as a dynamic parameter, a Natural session commences with an Adabas Open 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).

The Adabas record buffer to be used with the initial Adabas OP command can be explicitly provided. The format is similar to that used in an Adabas record buffer for the OP command with the exception that no blanks can be embedded, and the complete setting must be enclosed in parentheses (not apostrophes).

Example 1:
OPRB=(ACC=2,4,6,UPD=8.)

This specifies that Adabas Files 2,4 and 6 are to be made available for access only and that Adabas File 8 is to be made available for update (which also implies access).

Example 2:
OPRB=(EXU=1,2,3.)

This specifies that Adabas Files 1,2 and 3 are to be placed under exclusive control for this Natural session.

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

In all of the above situations, the OP command, which is always issued at the start of a Natural session, contains in the Additions 1 field of the Adabas control block the user ID for the Natural session. In batch mode, this is the job name. In TP mode, this is the setting supplied at system initialization by the Natural interface module. In both cases, the setting used is available in the Natural system variable *INIT-USER.

Top of page

NTOPRB Macro Syntax

The syntax of the NTOPRB macro is as follows:

NTOPRB dbid,'string'

For possible values, see the OPRB parameter; if you use Natural with VSAM, see also the Natural for VSAM documentation.

If string is very long, it can be divided in up to five strings separated by commas (see below), as the Assembler allows single strings up to 256 bytes only.

Top of page

Examples of NTOPRB Macros

NTOPRB 12,'ACC=40,UPD=20'
  
NTOPRB 15,'EXU=1,','2,3'

Top of page