ADAFDU (File Definition)

#### Search Results

Search

# ADAFDU (File Definition)

This document describes the utility "ADAFDU".

The following topics are covered:

- Functional Overview

- Procedure Flow

- Checkpoints

- Control Parameters

- Examples

## Functional Overview

The file definition utility ADAFDU defines a new base file and/or a LOB file in a database. It does not require the Adabas nucleus to be active.

The field definitions for a base file, including special descriptor definitions and referential integrity definitions for foreign keys, are read from the sequential file FDUFDT; the field definition of a LOB file is predefined. Additional input for ADAFDU is provided by parameters.

Note
If the new file contains collating descriptors, they are always created with ICU Version 5.4.

See Administration, FDT Record Structure in the Adabas on Windows and for Linux and Cloud documentation, for information about the syntax and use of the data definitions to define the logical structure of the file in the database.

See Administration, Loading And Unloading Data, File Space Estimation for information about formulae for calculating the Associator and Data Storage space requirements for a file.

This utility is a single-function utility. For more information about single- and multi-function utilities, please see Adabas Basics > Using Utilities > Single- and Multi-function utility in the Adabas on Windows and for Linux and Cloud documentation.

## Procedure Flow

##### Offline Mode

If the nucleus is not active, ADAFDU itself creates the new file in ASSO and DATA

##### Online Mode

If the nucleus is active, ADAFDU calls the nucleus to create the new file in ASSO and DATA. In this case, no checkpoint is written, but the file creation is logged in the database log, and in case of a recovery, the file is created automatically.

Data Set | Environment Variable/ Logical Name | Storage Medium | Additional Information
--- | --- | --- | ---
Associator | ASSOx | Disk |
Data storage | DATAx | Disk |
FDT information | FDUFDT | Disk (* see note) |
Protection Log | NUCPLG | Disk | Utilities Manual ADAPLP

## Checkpoints

The utility writes a SYNP checkpoint if it is performed offline. If the utility is performed online, the file definition is written to the PLOG, a SYNX checkpoint is written.

## Control Parameters

The following control parameters are available:

### ACBLOCKSIZE

    ACBLOCKSIZE = numberK

This parameter allows you to specify a block size for the allocation of the address converter extent.

#### Example:

    acblocksize = 6k

The address converter will be allocated with a block size of 6 kilobytes.

If the database does not contain enough space with this block size, ADAFDU aborts.

### ACRABN

    ACRABN = number

This parameter specifies the RABN at which the space allocation for the Address Converter is to start.

This parameter can be used to allocate the Address Converter to a given container file extent.

If this parameter is omitted, ADAFDU assigns the starting RABN.

### ADAM_KEY

    ADAM_KEY = key

If this parameter is specified, the file is defined as an ADAM file. The key can be either a descriptor name or the keyword `ISN'. If an ADAM key is used, it must be defined with the UQ option in the FDT. It must not be a sub-, super-, phonetic or hyperdescriptor. It must not be a multiple-value field or a field within a periodic group. It must not have the NU/NC option.

### ADAM_OVERFLOW

    ADAM_OVERFLOW = number

This parameter specifies the number of DATA overflow blocks for the file. Overflow blocks are required in case ADAM-calculated blocks get full. The overflow blocks are taken from the end of the file's DATA blocks.

At least one overflow block must be allocated.

The maximum is DSSIZE - 1.

Note
When checking the maximum value, and DSSIZE is specified in megabytes, it is assumed that the Data Storage block size is 32 - independent of the actual value. If you want to specify a larger value for ADAM_OVERFLOW, which is possible with a smaller Data Storage block size, DSSIZE must be specified in blocks.

The default is 1.

### ADAM_PARAMETER

    ADAM_PARAMETER = number

This parameter specifies the number of consecutive ISNs to be stored in one block if the keyword `ISN' is specified for the ADAM_KEY parameter.

If the ADAM key is a descriptor with fixed-point format, the parameter specifies the number of consecutive values for one block. For other key formats, it specifies an offset into the values. See Administration for more information.

A value may be specified in the range 1 to 10000.

The default value is 8.

### ADD_LOBFILE

    ADD_LOBFILE = (number, number)

The parameter ADD_LOBFILE is used to create a LOB file and assign it to an existing base file that is specified by the first number, the base file must not yet have an assigned LOB file. A LOB file, with the file number specified by the second number, is generated and assigned to the base file, and the base file is enabled for LOB processing. A file with the specified file number must not yet exist. The maximum number that can be specified is 32000. You can specify the parameters describing the data storage, the address converter, the normal and upper index of the LOB file, but the following should be taken into consideration:

- The block size for LOB file data blocks must be 32 KB.

- The block size for LOB NI blocks must be < 16 KB.

It is not possible to specify FILE if you specify ADD_LOBFILE, and vice versa.

Because there are some predefined requirements for a LOB file, not all the other ADAFDU parameters make sense in connection with ADD_LOBFILE, for example the ADAM_* parameters. These parameters are ignored by ADAFDU when the LOB file is added.

### ASSOPFAC

    ASSOPFAC = number

This parameter specifies the padding factor to be used for the file's index. The number specified is the percentage of each index block which is not to be used by a subsequent run of the mass update utility ADAMUP. This padding area is reserved for future use if additional entries have to be added to the block by the Adabas nucleus. This avoids the necessity of having to relocate overflow entries to another block.

A value may be specified in the range 0 to 95.

A small padding factor (0 to 10) should be specified if little or no descriptor updating is expected. A larger padding factor (10 to 50) should be specified if there is a large amount of descriptor updating in which new descriptor values are created.

You can change the padding factor at a later time using the utility ADAORD.

The default padding factor is 5.

### [NO]BT

    [NO]BT

If you specify NOBT, this file is a no-BT file, which means that modifications to this file are not made within normal transaction logic, and all modifications are kept in the database even if a transaction is backed out.

The default value is BT.

If Adabas is running in a cluster environment, the NOBT flag is ignored.

Note
The following points should be considered if the nucleus crashes:

- All database modifications for a no-BT file issued before the last ET command are applied to the database.

- It is not defined whether database modifications for a no-BT file issued after the last ET command are applied to the database or not.

### [NO]CIPHER

    [NO]CIPHER

This option can be used to enable or disable data record ciphering.

The default is NOCIPHER.

### CONTIGUOUS

    CONTIGUOUS = ( [AC] [,DS] [,NI] [,UI] )

This parameter is used to control ADAFDU's space allocations. If specified, ADAFDU ensures that only the first logical extent of the types specified is used.

By default, ADAFDU makes contiguous-best-try allocations.

### DATAPFAC

    DATAPFAC = number

This parameter specifies the padding factor to be used for the file's Data Storage. The number specified is the percentage of each data block which is not to be used when subsequently adding new records to the file with the mass update utility ADAMUP or with the Adabas nucleus. This padding area is reserved for future use if any record in the block requires additional space as a result of record updating by the Adabas nucleus. This avoids the necessity of having to relocate the record to another block.

A value in the range 0 to 95 may be specified.

A small padding factor (0 to 10) should be specified if there is little or no record expansion. A larger padding factor (10 to 50) should be specified if there is a large amount of record updating which will cause expansion.

You can change the padding factor at a later time using the utility ADAORD.

The default padding factor is 5.

### DBID

    DBID = number

This parameter selects the database to be used.

### DSBLOCKSIZE

    DSBLOCKSIZE = numberK

This parameter allows you to specify a block size for the allocation of the data storage extent.

#### Example:

    dsblocksize = 6k

Data storage will be allocated with a block size of 6 kilobytes.

If the database does not contain enough space with this block size, ADAFDU aborts.

### DSRABN

    DSRABN = number

This parameter specifies the RABN at which the space allocation for Data Storage is to start.

This parameter can be used to allocate Data Storage to a given container file extent.

If this parameter is omitted, ADAFDU assigns the starting RABN.

### DSSIZE

A contiguous-best-try allocation is made unless CONTIGUOUS=DS has been specified.

For non-ADAM files, this parameter can be omitted; in this case Adabas calculates a reasonable number of blocks to be used for Data Storage. If the size that is actually required is larger, the file is automatically increased.

### FDT

    FDT

If this parameter is specified, the FDT contained in the sequential file FDUFDT is displayed.

### FILE

    FILE = number

This parameter is required when a base file is to be created; it specifies the file number to be assigned to the file.

The `number' specified must not be currently assigned to another file in the database and must not exceed the maximum file number defined for the database. The maximum number that can be specified is 32000.

File numbers can be assigned in any sequence.

It is not possible to specify FILE if you specify ADD_LOBFILE, and vice versa.

### [NO]FORMAT

    [NO]FORMAT

This option is used to control whether the RABNs allocated for the file's index and Data Storage are to be formatted or not. The RABNs of the file's Address Converter are always formatted.

The default is NOFORMAT.

### LOBFILE

    LOBFILE = number [, LOBSIZE = number[B|M]]

If LOBFILE is specified, a LOB file with the specified number is generated and assigned to the base file to be created, and the base file is enabled for LOB processing. A LOB file with the specified file number must not already exist. The maximum number that can be specified is 32000. You should take the following into consideration:

- The block size for LOB file data blocks will be 32 KB.

- The block size for LOB NI and UI blocks will be < 16 KB.

- LOBSIZE specifies the size in Data storage of the LOB file, analogously to the parameter DSSIZE.

- Adabas calculates reasonable sizes for the Address converter, the normal and upper index of the LOB file. If you want to specify these values yourself, you should create the base file first without specifying LOBFILE, and then you should call ADAFDU again and add the LOB file with the ADD_LOBFILE parameter.

### [NO]LOWER_CASE_FIELD_NAMES

    [NO]LOWER_CASE_FIELD_NAMES

If LOWER_CASE_FIELD_NAMES is specified, Adabas field names are not converted to upper case. If NOLOWER_CASE_FIELD_NAMES is specified, Adabas field names are converted to upper case. The default is NOLOWER_CASE_FIELD_NAMES.

### MAXISN

    MAXISN = number

This parameter specifies the highest ISN expected in the file. The file definition utility ADAFDU uses this parameter to determine the amount of space to be allocated for the file's Address Converter (AC). The default value for MAXISN is 5000.

A contiguous-best-try allocation is made unless CONTIGUOUS=AC has been specified.

If the an ISN reaches the MAXISN, Adabas automatically allocates more AC blocks to that particular file. The maximum ISN in an Adabas file can be equal to a 4 byte unsigned integer (4,294,967,294).

Note
The value is rounded up to the number of ISNs that fit into the Address converter blocks required to store MAXISN ISNs in the Address converter, the exact value used as MAXISN for the file is:
(MAXISN specified / (Address converter block size / 4) + 1) * (Address converter block size / 4) -1. For example, using an Address converter with a block size of 4KB, the default value of 5000 is increased to (5000 / (4096 / 4) + 1) * (4096 / 4) -1 = 5119.

### NAME

    NAME {=|:} string

This parameter specifies the name to be assigned to the file. This name will appear together with data about this file in the database status report produced by the report utility ADAREP. A maximum of 16 characters are permitted. If you specify an equals sign, the value given for 'string' will be converted to upper case; if you specify a colon, no upper-case conversion is performed

### NIBLOCKSIZE

    NIBLOCKSIZE = numberK|(numberK,numberK)

This parameter allows you to specify a block size for the allocation of the Normal Index. Note that the Normal Index requires a block size >= 16 KB for large index values > 253 bytes, while a smaller block is allocated for descriptors with smaller descriptor values. The following must be taken into consideration:

- If you specify one block size, the file is created with all normal index blocks having this size.

- If you specify two block sizes, one value should be < 16K, and one value should be >= 16K. You should also specify two values for NISIZE; the first value for NIBLOCKSIZE corresponds to the first value of NISIZE, and the second value for NIBLOCKSIZE corresponds to the second value of NISIZE.

#### Examples:

    niblocksize = 6k

The normal index will be allocated with a block size of 6 kilobytes.

    niblocksize = (8k,32k)
    nisize = (1000b,10m)

The normal index will be allocated with 1000 blocks of block size 8 KB and 10 MB of block size 32 KB.

If the database does not contain enough space with this block size, ADAFDU aborts.

### NIRABN

    NIRABN = number|(number,number)

This parameter specifies the RABN at which the space allocation for the Normal Index is to start. This parameter can be used to allocate the Normal Index to a given container file extent.

If two RABNs have been specified, one should have a block size < 16KB, and the other should have a block size of >= 16KB.

If this parameter is omitted, ADAFDU assigns the starting RABNs.

If both NIBLOCKSIZE and NIRABN are specified, the block sizes of the RABNs specified as NIRABN must be equal to the values specified as NIBLOCKSIZE.

### NISIZE

If the block size cannot be derived from the NIBLOCKSIZE or the NIRABN parameter, the first value for NISIZE is used for blocks < 16KB, and the second value is used for blocks >= 16KB.

A contiguous-best-try allocation is made unless CONTIGUOUS=NI has been specified.

#### Examples:

    adafdu: nisize = 100b

If the block size cannot be derived from the NIBLOCKSIZE or NIRABN parameter, 100 blocks with block size < 16KB are allocated for the Normal Index.

    adafdu: nisize = (10m,1000b)

If the block size cannot be derived from the NIBLOCKSIZE or NIRABN parameter, 10 MB of blocks with block size < 16KB and 1000 blocks of block size >= 16KB are allocated for the Normal Index.

### [NO]PGM_REFRESH

    [NO]PGM_REFRESH

If PGM_REFRESH is specified, when the file loads, it can be refreshed by an E1 command, which resets to a state of no loaded records.

The default is NOPGM_REFRESH.

Note
Referential constraint is not allowed if the file specified as the primary file is defined with PGM_REFRESH=YES. Therefore, Response code 195 from ADABAS will come up when PGM_REFRESH is enabled for primary file.

### REUSE

    REUSE = ( keyword [,keyword] )

The REUSE parameter controls the reuse of Data Storage space or ISNs by Adabas.

#### REUSE = [NO]DS

NODS causes all newly-added records, together with records that have to be moved to another block (as a result of record expansion caused by updating) to be placed in the last used block in the Data Storage extent allocated to the file. If there is not sufficient space in this block, the next block is used.

If the DS keyword is specified, Adabas will scan the Data Storage Space Table (DSST) in order to locate a block with sufficient space. In this case, the first block found with sufficient space will be used.

The file control block for the specified file is modified to indicate the type of allocation to be used when adding new records or moving updated records.

The default value is DS.

#### REUSE = [NO]ISN

If REUSE is set to NOISN, Adabas does not reuse the ISN of a deleted record for a new record. Each new record will be assigned the next-highest unused ISN.

If REUSE is set to ISN, Adabas may reuse ISNs of deleted records. ISN reusage is done as follows: when a new record is stored in the database, an Address Converter (AC) block is read and checked for a free ISN. In order to keep the overhead for ISN reusage small, only one AC block is read - if no free ISN is found in the AC block, handling is the same as when ISN reusage is switched off.

Note
Setting REUSE to ISN, does not necessarily mean that ISN reusage is actually done. Because unsuccessful ISN reusage means an overhead for reading an additional AC block, Adabas sets ISN reusage to inactive if the probability of finding a reusable ISN is small. After deleting enough records, ISN reusage is then set to Active again.

The default value is NOISN.

#### Examples

    adafdu: reuse = (isn, ds)

ISNs of deleted records can be reassigned to new records. The DSST is scanned for free space when a record is added to the database or when an updated record is moved in the database.

    adafdu: reuse = isn

Reuse of data storage and ISNs is allowed.

    adafdu: reuse = <cr>

Reuse of data storage and no reuse of ISNs is specified. This is the default setting.

### SYFMAX

    SYFMAX = number

This parameter specifies the maximum number of values generated for a system generated multiple-value field. There is no explicit maximum value, but you should bear in mind, that you can get a record overflow if the value is defined too high; the compressed data record should also fit into one DATA block is SYFMAX values are defined for system generated multiple-value fields.

The default value is 1.

### UIBLOCKSIZE

    UIBLOCKSIZE = numberK|(numberK,numberK)

This parameter allows you to specify a block size for the allocation of the Upper Index. Note that the Upper Index requires a block size >= 16 KB for large index values > 253 bytes, while a smaller block is allocated for descriptors with smaller descriptor values. The following must be taken into consideration:

- If you specify one block size, the file is created with all normal index blocks having this size.

- If you specify two block sizes, one value should be < 16K, and one value should be >= 16K. You should also specify two values for UISIZE; the first value for UIBLOCKSIZE corresponds to the first value of UISIZE, and the second value for UIBLOCKSIZE corresponds to the second value of UISIZE.

#### Examples:

    uiblocksize = 6k

The upper index will be allocated with a block size of 6 kilobytes.

    uiblocksize = (8k,32k)
    uisize = (1000b,10m)

The upper index will be allocated with 1000 blocks of block size 8 KB and 10 MB of block size 32 KB.

If the database does not contain enough space with this block size, ADAFDU aborts.

### UIRABN

    UIRABN = number|(number,number)

This parameter specifies the RABN at which the space allocation for the Upper Index is to start. This parameter can be used to allocate the Upper Index to a given container file extent.

If two RABNs have been specified, one should have a block size < 16KB, and the other should have a block size of >= 16KB.

If both UIBLOCKSIZE and UIRABN are specified, the block sizes of the RABNs specified as UIRABN must be equal to the values specified as UIBLOCKSIZE.

If this parameter is omitted, ADAFDU assigns the starting RABN.

### UISIZE

If the block size cannot be derived from the UIBLOCKSIZE or the UIRABN parameter, the first value for UISIZE is used for blocks < 16KB, and the second value is used for blocks >= 16KB.

A contiguous-best-try allocation is made unless CONTIGUOUS=UI has been specified.

## Examples

#### Example:

    adafdu: dbid = 1, file = 9, maxisn = 55000, dssize = 2000b, dsrabn = 30629,
    adafdu: uisize = 50b, nisize = 300b,
    adafdu: assopfac = 20, datapfac = 10

File 9 is to be loaded. The maximum number of expected records preset for the file is 55000. 2000 blocks are allocated for Data Storage. The Data Storage allocation will start at RABN 30629. 50 blocks are allocated for the Upper Index. 300 blocks are allocated for the Normal Index. The padding factor for the Associator is 20 percent. The padding factor for Data Storage is 10 percent.

### On this page

- Functional Overview
- Procedure Flow
- Checkpoints
- Control Parameters
- Examples