CBL_RENAME_FILE

Changes the name of a file.

Syntax:

call "CBL_RENAME_FILE" using     old-filename
                                 new-filename
                       returning status-code

Parameters:

old-filename
pic x(n).
new-filename
pic x(n).
status-code
See Library Routines - Key.

On Entry:

old-filename
The file to rename. The name can contain a pathname, and is terminated by a space. If no path is given, the current directory is assumed.

This routine does not work with filenames containing wildcard characters.

new-filename
The new name, terminated by a space. If old-filename contains a pathname or URL, this must contain the same pathname or URL. Some operating systems do not allow you to rename a file if a file of the name in new-filename already exists

On Exit:

None

Comments:

CBL_RENAME_FILE is not stripe-aware. If you use this routine on a striped file, the routine renames the first stripe only. Therefore, use this routine on an individual stripe only and refer to the stripe by the stripe name.

Note: Striping is deprecated, and provided for backward compatibility only. We recommend you use IDXFORMAT"8" instead.

You can check the success of the call by examining RETURN-CODE. See the topic Interpreting the return code as a file status code for more details.