DSCHECK: Check Data Storage

#### Search Results

Search

# DSCHECK: Check Data Storage

Use the ADACHK DSCHECK utility function to check Data Storage and the Data Storage space table (DSST) of a specific file (or files) in the database. It can be run while concurrent updates are running. ADACHK reads each used Data Storage block (according to the Data Storage extents in the file control block) and performs consistency checks. These include verifying:

- That the block length is within the permitted range.

- That the sum of the length of all records in the Data Storage block plus four is equal to the block length.

- Whether any record exists with a record length greater than the maximum compressed record length for the file or with a length of zero.

- Whether there are any duplicate ISNs within a single block.

- That the ISN headers are valid if spanned records are used. In addition, checks are performed to ensure that each header contains the ISN of the primary record in the chain and the ISN of the next spanned record in the chain.

- That the primary and secondary spanned records are correctly identified, if spanned records are used.

- Whether the associated DSST element contains the correct value. If not, a repair of the DSST is necessary.

- The compressed record and printing it.

- Large object (LB) field value reference structures in a base file's compressed record. The relationship of an LB field value reference to the LB field value stored in the associated large object (LOB) file is not verified. LOB and base files are processed independently.

The syntax of the ADACHK DSCHECK utility function is:

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

- Essential Parameters

- Optional Parameters and Subparameters

- Examples

## 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 in a file processed by the ADACHK DSCHECK run is in ciphered form, the cipher key must be specified using the CODE parameter. In addition, you must also include the cipher file in the FILE parameter. Only one cipher file can be specified in the run. For more information, read Cipher File Considerations, earlier in this section.

>   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.

> COMPREC: Check and Print Compressed Record

>   Specify this parameter to check and print the compressed Data Storage records.

>   This is a comparable function to the ADAICK DSCHECK function. The FILE and ISN parameters must also be specified when this parameter is specified. A spanned record will be printed as a single logical record.

> 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.

>   If the file listed in the FILE parameter is enciphered, the CODE parameter is also required. You must specify the cipher key in the CODE parameter. For more information, read Cipher File Considerations, earlier in this section.

> FROMRABN: Starting RABN to be Checked

>   The RABN of the Data Storage block where the check should start. This parameter is applicable only if a single file is to be checked; this parameter cannot be specified in conjunction with the ISN parameter. In other words, only one FROMRABN/TORABN range can be specified in a single ADACHK run. If more than one FROMRABN/TORABN range is specified in an ADACHK request for multiple files, only the last range is used in the run. In addition, if the range specified by the FROMRABN/TORABN parameters is outside the range for any given file Data Storage extent, ADACHK will not check the blocks in the extent. Consequently, if more than one FROMRABN/TORABN range is specified, or if the range is outside the range for any given file Data Storage extent, Adabas issues a warning message.

>   If this parameter is omitted and if the ISN parameter is omitted, the check starts at the beginning of the first allocated Data Storage extent for the file.

> ISN: ISN Range to be Checked

>   The ISN or range of ISNs to be checked. If no ISN or range of ISNs are specified, the entire range of ISNs (from MINISN through TOPISN) is checked.

>   You cannot specify the ISN parameter in conjunction with the FROMRABN parameter; these two parameters are mutually exclusive.

> 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.

> 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.

> REPAIR: Repair the Data Storage Space Table

>   Specify this parameter if you would like ADACHK to repair the Data Storage Space Table (DSST) if it finds any invalid DSST elements.

> 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.

>   Note
>   If your database contains cipher files, note that the TEST parameter does not check the types of files in the database. This means that the TEST run will not show any ADACHK errors related to cipher files in the run; these errors will only become apparent when you perform the ADACHK run without the TEST parameter. For more information, read Cipher File Considerations, earlier in this section.

> TORABN: Ending RABN to be Checked

>   Use this parameter to specify the RABN of the Data Storage block where the ADACHK check should end. This parameter is applicable only if a single file is to be checked. In other words, only one FROMRABN/TORABN range can be specified in a single ADACHK run. If more than one FROMRABN/TORABN range is specified in an ADACHK request for multiple files, only the last range is used in the run. In addition, if the range specified by the FROMRABN/TORABN parameters is outside the range for any given file Data Storage extent, ADACHK will not check the blocks in the extent. Consequently, if more than one FROMRABN/TORABN range is specified, or if the range is outside the range for any given file Data Storage extent, Adabas issues a warning message.

>   If this parameter is omitted, the check ends at the end of the last allocated Data Storage extent for the file.

> USAGE: Print Bar Graph of Data Storage Block Usage

>   If the USAGE is specified, ADACHK prints a bar graph that shows the number of bytes used in each Data Storage block, the block size, and the percentage of blocks used.

> 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.

## Examples

The following example checks Data Storage and the Data Storage Space Table (DSST) for file 5 in the database. It will produce a bar graph showing the number of bytes used in each Data Storage block, the block size, and the percentage of blocks used. In addition, if DSST errors are identified during the check, they will be repaired.

    ADACHK DSCHECK FILE=5, USAGE,REPAIR

The following example checks Data Storage and the DSST for file 1 RABNs ranging from 412 to 420.

    ADACHK DSCHECK FILE=1, FROMRABN=412,TORABN=420

The following example checks Data Storage and the DSST for file 1, ISN 4. The compressed record for file 1, ISN 4 is also checked and printed.

    ADACHK DSCHECK FILE=1, ISN=4, COMPREC

### On this page

- Essential Parameters
- Optional Parameters and Subparameters
- Examples