VALIDATE: Validate All Database Files

Use the ADACHK VALIDATE utility function to validate any or all files within an Adabas database, except the checkpoint and security files. It can be run while concurrent updates are running.

The VALIDATE function validates the contents of Data Storage against values in the Associator. This is done by reading compressed records from Data Storage and creating a DVT that is validated against each corresponding value in the indices. ADACHK prints a list of all fields compared and the ISNs rejected during validation on SYSOUT (DD/DRUCK).

The syntax of the ADACHK VALIDATE utility function is:

graphics/adachk_validate.png

This document describes the syntax and parameters of the VALIDATE function.


Essential Parameters

There are no required parameters for this utility function.

Optional Parameters and Subparameters

The following optional parameters can be specified.

ABEND34: Change User Abend 35 to 34

This optional parameter can be used to change a user abend 35 to user abend 34 if a utility error occurs. This ensures that a dump is produced when the utility terminates abnormally.

The NOUSERABEND, TEST, and ABEND34 parameters affect the processing of the entire ADACHK run.

CODE: Cipher Code

The CODE parameter is required if the file or file(s) being processed by the ADACHK utility are enciphered. Specify the required cipher key.

If the data is in a file is in ciphered form, the cipher code must be specified using the COMPREC parameter. For more information on the use of ciphering in Adabas databases, contact your Software AG technical support representative for more information about Adabas Security documentation.

DESCRIPTOR: List of Descriptors

The DESCRIPTOR parameter restricts ADACHK processing to one descriptor field, providing a way to limit the run in cases in which the Associator is very large or there is a need to evaluate a specific descriptor. If DESCRIPTOR is not specified, ADACHK validates all qualifying descriptor fields.

The following is an example of DESCRIPTOR use:

ADACHK CHECK FILE=4,DESCRIPTOR=’AA,BB’
ERRLIM: Error Threshold

The maximum number of errors that this ADACHK utility function will tolerate before terminating. Valid values are any positive integer <=5000. If no valid value is specified for this parameter, a default of "100" is used.

If a value less than 0 or greater than 5000 is specified, the following error will result, and the default value will be used:

CHK413E, ERROR: Parameter ERRLIM is incorrect.
FILE: Files To Be Checked

The file or single range of files to be checked. If no file or range of files are specified, all files in the database are checked.

LAYOUT: Report Detail Level

The level of data produced for the report. Valid values are described in the following table:

Valid Values Description
SHORT Specify this value to produce the minimum output. This is the default.
MEDIUM Specify this value to produce medium-level output (several interpreted lines).
LONG Specify this value to produce extensively-detailed output.
LWP: Sort Work Pool Size

LWP specifies the size of the work pool to be used for sorting, if SORTTYPE=INTERNAL. It cannot be specified with SORTTYPE=EXTERNAL. The LWP value can be specified in bytes or kilobytes (value followed by a "K"). If no value is specified, the default is 10485760 bytes (or 10240K).

If ADARUN parameter V64BIT=YES has been specified, the work pool is allocated in 64-bit addressable storage, on systems that support it.

The minimum value for LWP is 102,400 (100K). The maximum value is limited by how much 31-bit or 64-bit addressable virtual storage ADACHK can obtain from the system.

When the amount of data to be sorted exceeds the space declared by the LWP parameter, one or two sort data sets defined in the ADACHK job may be used as temporary storage. For more information, read Sort Data Set Considerations. The sort data set(s) should be at least as large as the combined ASSO and DATA extents of the largest file to be processed by ADACHK.

If a sort data set is provided and large enough, the default value of 10 megabytes is sufficient for checking Adabas files of about three gigabytes. For checking larger files, LWP should be increased. As a rule of thumb, an LWP of size n*10 MB supports files sizes of about n*n*3 GB. For example, LWP=102400K (100 megabytes = 10*10 MB) is sufficient for processing files of about 300 gigabytes (= 10*10*3 GB).

It is generally recommended you make LWP larger than the required minimum to reduce the number of I/Os for sorting and thus to improve the performance of ADACHK.

MAXCALLS: Maximum Number of Nucleus Calls

The maximum number of nucleus calls allowed per file. Once this limit is hit, no more nucleus calls can be made and a warning message that the limit has been reached is printed. Valid values are any positive integer, with no upper limit.

The default for MAXCALLS is either the value "200" or the result of the TOPISN setting divided by 100 (TOPISN/100), whichever is greater.

MAXDESCLEN: Maximum Length of Descriptor Value

Use the MAXDESCLEN parameter to specify the maximum length of a descriptor value present in the file during compressed record extraction. If the MAXDESCLEN parameter is not specified, the default is to extract the largest default descriptor length from the FDT.

The output produced by ADACHK VALIDATE varies based on the status of the nucleus (whether it is up or down) and the setting of the MAXDESCLEN parameter. For more information, read Output Anomalies Based on Nucleus Status and MAXDESCLEN Setting.

NOSYNC: Transient Error Confirmation

Note:
Use of this parameter is not recommended and is only intended for users who want to limit calls to their nucleus.

Use this parameter to control whether transient errors are confirmed via the active nucleus. If this parameter is specified, no nucleus calls are made and the errors reported may be due to concurrent updates. A warning message is generated informing you.

NOUSERABEND: Termination without Abend

When a parameter error or a functional error occurs while this utility function is running, the utility ordinarily prints an error message and terminates with user abend 34 (with a dump) or user abend 35 (without a dump). If NOUSERABEND is specified, the utility will not abend after printing the error message. Instead, the message "utility TERMINATED DUE TO ERROR CONDITION" is displayed and the utility terminates with condition code 20.

Note:
When NOUSERABEND is specified, we recommend that it be specified as the first parameter of the utility function (before all other parameters). This is necessary to ensure that its parameter error processing occurs properly.

The NOUSERABEND, TEST, and ABEND34 parameters affect the processing of the entire ADACHK run.

SORTTYPE: Sort Type Used

The type of sort to use. Valid values are "INTERNAL" (the default) and "EXTERNAL".

Value Meaning
EXTERNAL An external sort facility will be used to sort the data. For information about operating system considerations related to this option, read SORTTYPE=EXTERNAL Operating System Considerations.
INTERNAL An internal sort facility will be used to sort the data. This is the default. For information about the use of sort data sets with this setting, read Sort Data Set Considerations.
TEST: Test Syntax

The TEST parameter tests the operation syntax without actually performing the operation. Note that the validity of values and variables cannot be tested: only the syntax of the specified parameters can be tested. See Syntax Checking with the TEST Parameter for more information about using the TEST parameter in ADACHK functions.

The NOUSERABEND, TEST, and ABEND34 parameters affect the processing of the entire ADACHK run.

UTYPE: User Type

The user type in effect for the ADACHK run. Valid values are:

Value Identifies
ACC An access-only user. This is the default. When ACC is specified, parallel updates are allowed on the file by normal users (but not by other utility processes).
EXF An exclusive file control user. When EXF is specified, only the ADACHK process can use the file; no other users can read or write to the file in parallel with the ADACHK run.
EXU An exclusive control user. When EXU is specified, parallel reads are allowed on the file by normal users. This option might provide better performance if there are a lot of concurrent updates ongoing.

Output

This section describes various aspects of the output produced by the ADACHK VALIDATE function.

Output Anomalies Based on Nucleus Status and MAXDESCLEN Setting

The output produced by ADACHK VALIDATE varies based on the status of the nucleus (whether it is up or down) and the setting of the MAXDESCLEN parameter.

In the following example, the nucleus is not active (it is down). Zero (0) transient errors were found but 32 calls were attempted. Since the nucleus was down and truncation occurred, ADACHK VALIDATE reports these as errors but provides a warning message (CHK416W) and a condition code of 8. It also provides the length of the longest truncated field so you can avoid the truncation error on the next run.

CHK025I, The Adabas nucleus is currently INACTIVE 
MAXDESCLEN = 10
------------------------------------------------------------------------------
File DE F ISN DE Value 
---- -- - ------------ -------- -------- -------- -------- ------------------- 
CHK416W, WARNING: Value for field AA has been
truncated. Errors for this field may be due to truncated values. Specify a
larger MAXDESCLEN to avoid truncation of data storage record field values. 

26 AA - 5 19C1C1C1 C1C14040 40404040 40404040 *.AAAAA * 40404040 40404040 4040 * *

CHK417I, The longest truncated field value was 50 bytes. This value belongs to
descriptor AA. Specify MAXDESCLEN at least this size on next run. 

*****ADACHK Nucleus Statistics - Error Verifications***** 
Number of transient errors = 0
Number of nucleus verification calls = 32 

In the following example, the nucleus is active (it is up). ADACHK VALIDATE performs the truncation that resulted in an error. It then made a call to the nucleus to confirm whether the error was real or transient. In this case, it was transient. In this case, with the help of the nucleus, ADACHK was able to determine that the errors were transient due to the truncation and provides an informative message so that the setting of MAXDESCLEN can be increased to avoid the nucleus call in future invocations.

CHK025I, The Adabas nucleus is currently ACTIVE 
MAXDESCLEN = 10 CHK416W, 

WARNING: Value for field AA has been truncated. Errors for this 
field may be due to truncated values. Specify a larger MAXDESCLEN to avoid 
truncation of data storage record field values. 

26 AA *** No Inconsistencies *** 

CHK417I, The longest truncated field value was 50 bytes. This value belongs 
to descriptor AA. Specify MAXDESCLEN at least this size on next run. 

*****ADACHK Nucleus Statistics - Error Verifications*****
Number of transient errors = 32 
Number of nucleus verification calls = 32

Directing Rejected ISNs to a Sequential Data Set

If you choose, rejected ISNs can be output to a sequential data set (DD/FEHL). The first record on DD/FEHL always has the following structure:

Bytes Description
0-1 Record length in binary format (example: X'0012')
2-3 Set to zero (example: X'0000')
4-9 Program ID (example: C'ADACHK')
10-13 Four-byte packed Julian date in format, YYYYDDDF ("F" = B'1111')
14-17 Four-byte packed time in format, hhmmssth (t = tenths of a second, h = hundredths of a second)

All remaining DD/FEHL records have the following structure (items shown with an asterisk (*) are also in the normal SYSOUT and DD/DRUCK output):

Bytes Description
0-1 Record length in binary format (example: X'0012')
2-3 Set to zero (example: X'0000')
4-5 Adabas file number in binary format
6 Flag byte:
  • C'-': A value is missing.

  • C'+' : A value is incorrect.

7 Set to zero.
8-11 ISN in binary format.
12-13 Descriptor name as stored in the field definition table (FDT).
14 Descriptor value length in binary format.
15- Descriptor value

Example of ADACHK VALIDATE Output

ADACHK VALIDATE output provides a SYSOUT (DD/DRUCK) table listing, by file and descriptor, of all Data Storage and Associator entries and their status. The following is an example of ADACHK VALIDATE output:

FILE  DE  F      ISN    DE-VALUE
------------------------------------------------------------
  1   AA    *** NO INCONSISTENCIES ***
  1   BA  -        35  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       173  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       471  07C6D935 C5D4C1D5          *.FREEMAN*

  1   BA  -       534  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       597  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       622  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       658  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       717  07C6D935 C5D4C1D5          *.FREEMAN*
  1   BA  -       152  05D4C5E8 C5D9              *.MEYER*
  1   BA  +       153  05D4C5E8 C5D9              *.MEYER*
  1   BB    *** NO INCONSISTENCIES ***
  1   CA    *** NO INCONSISTENCIES ***
  1   CB    *** NO INCONSISTENCIES ***
  1   CC    *** NO INCONSISTENCIES ***
  1   CD    *** NO INCONSISTENCIES ***
  1   PA    *** NO INCONSISTENCIES ***
  1   S2    *** NO INCONSISTENCIES ***            DE DELETED

where:

  • In the F (flag) column, a dash (--) indicates that an inverted list entry is missing for the specified Data Storage descriptor; and a plus symbol (+) indicates that the inverted list entry in the Associator is incorrect.

  • The DE-VALUE column provides the compressed descriptor value, first in hexadecimal and then in alphanumeric.

Notes:

  1. The "*** NO INCONSISTENCIES ***" entry occurs for every successful descriptor validation.
  2. "DE DELETED" will be printed for logically deleted descriptors.

Examples

In the following example, the first VALIDATE function will validate files 1 through 3 using an external sort. The maximum length of a descriptor value present in files 1 through 3 is 15. The second VALIDATE function will only validate descriptor fields AA and BB in file 4.

ADACHK VALIDATE FILE=1-3,MAXDESCLEN=15,SORTTYPE=EXTERNAL 
ADACHK VALIDATE FILE=4,DESCRIPTOR=’AA,BB’