Version 7.4.2
 —  Adabas Vista Programming Guidelines  —

Using Adabas Vista with Adabas

This section provides programming guidelines for using Adabas Vista with Adabas:


Adabas Vista ISN

If an Adabas file is defined as an Adabas Vista partitioned file, each Adabas ISN is modified with a partition identifier before returning the ISN to the application. Such a modified ISN is called an Adabas Vista ISN. Correspondingly, any ISN received from an application program for such a file is interpreted as an Adabas Vista ISN.

At the time the partition is defined, the space for a partition identifier is reserved within the 4-byte ISN field. The size of this area is based on the Adabas Vista file parameter Maximum Number of Partitions.

For example, the format of an Adabas Vista ISN for a partitioned file defined with a Maximum Number of Partitions set to 255 is as follows:

Offset Length Contents Meaning
00 1 X'01' - X'FF' The ID of the partition from which the record was retrieved.
01 3 X'000000' - X'FFFFFF' The Adabas ISN of the record within the physical partition

Application programs that manipulate ISNs must be capable of handling the full 4-byte binary value returned. For Natural applications, any variable assigned to an ISN value should be defined with a minimum of P10. A value lower than this reduces the number of usable partitions and may result in a NAT1305 error code.

Caution:
Special care is required when an application uses an ISN value as data. If a partitioned file is re-partitioned, the stored ISN may well become inaccurate.

Caution:
When converting an Adabas file to a partitioned file, any ISNs for the file that may have been stored as data in other files must go through a conversion process to change the ISN values stored into correct Adabas Vista ISN values.

Top of page

Adabas Commands

E1 Command (Refresh File)

If an E1 command is issued with an ISN value of zero and with a blank Command ID, the file is refreshed. This is also true for a partitioned file.

Note:
The E1 command will be issued to each partition in turn. Any error which occurs when a later partition is refreshed (for example, Adabas response code 114 because the partition was not loaded with PGMREFRESH=YES specified) will result in a partially refreshed partitioned file.

ET Command

An ET (END TRANSACTION) command commits all outstanding updates for the current transaction.

The Natural END TRANSACTION statement accomplishes this by issuing ET commands to all databases involved in the current transaction. For multiple databases, Natural issues an ET serially to each database.

3GL programs should also adopt this logic.

Adabas Vista uses the same principle. On receipt of an ET command, serial ET commands are issued to all appropriate databases involved in the user transaction.

The parameter ET Data Database Number is used to specify the location for transaction data.

ET and CL Commands with Command Option 'E'

ET and CL commands may use Command Option 'E' to indicate that user data is to be stored in an Adabas system file. When Adabas Vista encounters this command, it may issue multiple commands to different databases and will always issue the command with Command Option 'E' last.

S5 Command (Complex Find)

The S5 command is only available for use with Adabas Vista partitioned files when the Single Partition Focus feature is enabled.

Record Hold Logic

When using Adabas Vista, it is recommended to use the GET (L4) command to hold records immediately before modifying them. This is particularly relevant to those programs that would otherwise use the READ (L6) and FIND (S4) commands against a partitioned file.

Refer also to the section Distributed Lock Mode.

Prefetch/Multifetch

Adabas Vista performs its own read-ahead processing. For an Adabas Vista application which uses the command options P, M or O to invoke prefetch/multifetch, Adabas Vista will return an appropriate number of records as per Adabas.

Read Sequential Direction Changes

When the Adabas Vista read-ahead feature is enabled, a direction change during a sequential read is not allowed within the following command constructs:

When issuing an L9 command sequence, a second direction change is not allowed for distributed access.

When processing a direction change during an L9 command sequence, Adabas Vista places restrictions on format and length overrides in the search buffer.

Release Global Format IDs

A RC command which uses the C, L or O command options in order to release specific or all global format IDs will only be issued to the database specified in the command. In addition, the command options will always be changed to C to ensure that all global format IDs generated by Adabas Vista are also released by Adabas.

Optional ISN Positioning

Any program that accesses a partitioned file and requires the use of ISN positioning (for example, a starting ISN on an initialL3 command, or a minimum ISN value on an initial Sx command) must ensure that the supplied ISN is in Adabas Vista format. Adabas Vista then targets the appropriate partitions of the partitioned file.

Command ID within a Search Expression

Adabas Vista does not support a Command ID value enclosed in parentheses as a search expression for partitioned file access.

Top of page

Adabas Parameters

The following Adabas ADARUN parameters may need to be tuned for use with Adabas Vista.

Adabas Parameter Description
LI

If a single file is partitioned into n files within the same database, it may obtain as many as n TBI elements per user as required for Adabas Vista distributed access.

The increase in TBI elements depends on the amount of this distributed access and the number of partitions used in the average request. Therefore, the value of the LI parameter may need to be increased.

LQ

The LQ parameter is similar to the LI parameter above. The LQ pool may need to be increased.

LU

The LU parameter value should be set to 65535 whether or not Adabas Vista is used. This requires a minimum NABparameter setting of 16.

NAB

The NAB parameter value may need to be increased if the Adabas Vista read-ahead feature is used and/or a significant number of partitions are defined to the database.

NC

If one or more partitions are added to a database for the first time, the value for the NC parameter may need to be increased.

NH

See the NISNHQ parameter below.

NISNHQ

Along with the NH parameter, this parameter may need to be increased if

  • a significant number of new partitions are added to the database and hold-based commands are issued becaused of distributed access.

  • the Adabas Vista read-ahead feature is used with hold-based commands.

NQCID

Similar to theLI parameter. The value for NQCID may need to be increased if a significant number of new partitions are added to the database and significant use of TBQ elements occurs because of distributed access.

NU

If one or more partitions are added to a database for the first time, the NU parameter value may need to be increased.

PREFETCH

This parameter is needed to control the Adabas Vista read-ahead feature at the job level. No other Adabas prefetch parameter is necessary.

TNAA, TNAE, TNAX, TT

Where partitions span more than one database, it is possible that a user may, during a series of related accesses, request numerous consecutive records from the same database within a distributed access. This may result in Adabas timing the user out on the other databases involved in the distributed access, which produces a response code 9 when Adabas Vista tries to continue the sequence on these databases.

The values for the parameters TNAA,TNAE,TNAX, and TT should therefore be aggregated to the highest values for all databases containing partitions.

Top of page

Adabas Security and Ciphering

When using Adabas Vista partitioned files, Adabas passwords and cipher codes must be the same for each partition.

Top of page

Adabas SQL Server

Adabas Vista partitioning can be used without restriction for normal SQL statements that refer to data within a table. Adabas Vista partitioning is not supported for the Adabas files that comprise the SQL catalog. SQL statements that perform physical management of a table are not supported for Adabas Vista partitions. Physical management of Adabas Vista partitions must be performed by Adabas utilities.

Top of page