CALL "RENAME" USING sourceFile destFile renameStatus [fileType] |
sourceFile | PIC X(n) | Specifies the name of the file you want to rename. If the file name starts with "isf://", the file will be searched via the File Server specified in the name. See The ISF protocol for more information. |
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 binary Sequential, the default. The default type "S" is suitable to rename generic disk files like PDFs. File type "I" is useful in cases where the original file is held in more than one physical disk file (for example, JIsam and c-tree files are physically held in two separate files). With File type "I" the file name is passed to the indexed file handler APIs so it must be suitable for them. For example, if the file handler is JIsam, avoid the "dat" extension and use a server side path. |
call "rename" using "CUST", "CUST2015", renameStatus, "I" if renameStatus not = 0 display message "Rename failed!" end-if |
call "rename" using "cust.list" "custJan14.list" renameStatus if renameStatus not = 0 display message "Rename failed!" end-if |