RENAME: Rename File or Database

#### Search Results

Search

# RENAME: Rename File or Database

The RENAME function may be used to change the name assigned to a file or database.

This utility function does not need to lock the database file for its use; this function can perform its processing in parallel with active users. This means that you do not need to set the file to read-only status to run this utility function.

This document covers the following topics:

- Essential Parameter

- Optional Parameters

- Examples

## Essential Parameter

> NAME: New File Name

>   NAME is the new name to be assigned to the file. It is specified between apostrophes (for example, 'RESERVATIONS'). A maximum of 16 characters can be used.

## Optional Parameters

> FILE: File Number

>   FILE is the number of the file to be renamed: if specified as zero or omitted, the database is renamed.

> INPARALLEL: Execute function in parallel

>   When INPARALLEL=YES (the default) is specified, the function may be executed even if other users are active on the file. Adabas performs the function while all application commands against the file are temporarily quiesced and suspended. The integrity of the file targeted by the ADADBS function is maintained.

>   INPARALLEL=YES is applicable only when renaming a file (i.e., FILE parameter is specified and nonzero), not when renaming the database.

>   With INPARALLEL=NO, the function requires exclusive file control – that is, no applications can be executing against the file. Adabas refuses to execute the function (with response code 48) if other users are active on the file.

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

> PASSWORD: File Password

>   The password of the file. This parameter is required if the file is password-protected.

> TEST: Test Syntax

>   The TEST parameter tests the operation syntax without actually performing the operation. Only the syntax of the specified parameters can be tested; not the validity of values and variables. See Syntax Checking with the TEST Parameter for more information on using the TEST parameter in ADADBS functions.

## Examples

The name of file 2 is to be changed to "INVENTORY".

    ADADBS RENAME FILE=2,NAME='INVENTORY'

The database is renamed to "RESERVATIONS".

    ADADBS RENAME  NAME='RESERVATIONS',FILE=0

### On this page

- Essential Parameter
- Optional Parameters
- Examples