CBL_COPY_FILE

Copies a file.

Syntax:

call "CBL_COPY_FILE" using     filename1
                               filename2
                     returning status-code

Parameters:

filename1
pic x(n).
filename2
pic x(n).
status-code
See Library Routines - Key

On Entry:

filename1
The file to copy. The name can contain a path and is terminated by a space. If no path is given, the current directory is assumed.
filename2
The name of the new file. The name can contain a path and is terminated by a space. If no path is given, the current directory is assumed.

On Exit:

None.

Comments:

This routine does not work with filenames containing wildcard characters.

CBL_COPY_FILE is not stripe-aware. If you use this routine on a file for which striping is enabled, the details returned refer to 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.