This section provides programming guidelines for using Adabas Vista with Adabas:
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.
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.
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 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.
The S5
command is only available for use
with Adabas Vista partitioned files when the Single Partition Focus feature is
enabled.
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.
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.
When the Adabas Vista read-ahead feature is enabled, a direction change during a sequential read is not allowed within the following command constructs:
L3
command with no accompanying value
re-position; and
L9
command.
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.
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.
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.
Adabas Vista does not support a Command ID value enclosed in parentheses as a search expression for partitioned file access.
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 |
LQ |
The |
LU |
The |
NAB |
The |
NC |
If one or more partitions are added to a database for the first
time, the value for the |
NH |
See the |
NISNHQ |
Along with the
|
NQCID |
Similar to the |
NU |
If one or more partitions are added to a database for the first
time, the |
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
|
When using Adabas Vista partitioned files, Adabas passwords and cipher codes must be the same for each partition.
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.