RENAME

RENAME renames the file specified by SOURCE-FILE to the name specified by DEST-FILE. The syntax of RENAME is:

CALL "RENAME" USING SOURCE-FILE, DEST-FILE, 
        RENAME-STATUS, FILE-TYPE.

Remote file name notation is not permitted on the DEST-FILE parameter. If the SOURCE-FILE parameter specifies a remote file:

FILE_PREFIX is not used to search for file names held in any of the function's parameters. Name aliases are not substituted for names held in the function's parameters. Full path names to the files, including remote name notation on the SOURCE-FILE, must be hard coded in the function call. A more portable solution is to use the ACCEPT FROM ENVIRONMENT statement to get pathnames during program execution. See ACCEPT Statement in the ACUCOBOL-GT Reference Manual for more information.

RENAME-STATUS holds a zero (0) if the routine is successful; otherwise, it is set to the operating system's error number, or 19 if there is a network error (for example, AcuServer is not running).

For a complete description of RENAME, excluding the above restrictions, see Appendix I of the ACUCOBOL-GT documentation.