skip to main content

Library Routines : CBL_RENAME_FILE

CBL_RENAME_FILE
The CBL_RENAME_FILE library routine renames a file.
FILE-PREFIX settings are ignored by this routine.
Syntax:
 CALL "CBL_RENAME_FILE" USING oldName 
Parameters:
If the name is a relative path and iscobol.file.prefix is set, then FILE-PREFIX paths are used to locate the file.
If the name is a relative path and iscobol.file.prefix is set, then FILE-PREFIX paths are used to locate the file.
Return code:
returnCode can be any numeric data item and provides additional information:
Examples:
Example - Rename file to append the date it was generated
accept curr-date from date
initialize new-name
string "c:\app1\reps\cust-report-"
  into new-name
move "c:\app1\reps\cust-report.lst" to old-name
call "cbl_rename_file" old-name new-name
if return-code not = 0
   display message "Rename operation failed"

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left