CBL_RENAME_FILE2 changes the name of a file. The difference between the CBL_RENAME_FILE subroutine and this subroutine is that this subroutine can support a file name containing a space.
Specification
01 old-file-name PIC X(n). 01 new-file-name PIC X(n). 01 status-code PIC S9(4) COMP-5.
CALL "CBL_RENAME_FILE2" USING old-file-name new-file-name RETURNING status-code.
Interface
Specifies the old name of the file, ending with a null character. The maximum size of the file name is 255.
Specifies the new name of the file, ending with a null character. The maximum size of the file name is 255.
Return code
The return code is set in the status-code specified in the RETURNING clause.
0: Successful
Other than 0: Failure