RENAME The RENAME library routine renames a file. Many aspects of the behavior of this routine are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful. Syntax: CALL "RENAME" USING sourceFile destFile renameStatus [fileType] Parameters: sourceFile PIC X(n) Specifies the name of the file you want to change the name. destFile PIC X(n) Specifies the new file name. renameStatus any numeric data item Receives the status of the operation: 0 the operation has been executed successfully. 1 the operation failed. fileType PIC X(1) Specifies the file type. Valid values are: “I” File is Indexed “R” File is Relative “S” File is Sequential (default) Examples: Example - Rename an ISAM file call "rename" using "CUST", "CUST2015", renameStatus, "I" if renameStatus not = 0 display message "Rename failed!" end-if Example - Rename an sequential file call "rename" using "cust.list" "custJan14.list" renameStatus if renameStatus not = 0 display message "Rename failed!" end-if