RENAME

Renames a file.

Syntax:

CALL "RENAME"
   USING source-file, dest-file, [status,] [file-type]
   

Parameters:

source-file
PIC X(n)
dest-file
PIC X(n)
status
Any numeric type
file-type
PIC X

On Entry:

source-file
The path name of the file to be copied
dest-file
The path name of the destination file
file-type
The file organization of the source file. It must be one of: S (for sequential), R (for relative) or I (for indexed).

This defaults to S if not specified.

On Exit:

status
Returns zero if the rename is successful, or non-zero if not.

Comments:

To obtain an extended file status code for this operation, define status as comp xx comp-x and follow the example in Extended File Status Codes.