Previous Topic Next topic Print topic


RENAME

Renames a file.
Note: When calling this routine, ensure you are using the 1024 calling convention.

Syntax:

CALL "RENAME" USING old-name new-name [exit-code]

Parameters:

old-name
PIC X(n)
new-name
PIC X(n)
exit-code
PIC S9(4) BINARY

On Entry:

old-name
The source filename.
new-name
The target filename.

On Exit:

exit-code
The exit code of the command upon return from the operating system: zero for success and non-zero for failure.

Comments:

The values for the old-name and new-name parameters may be quoted with double quotes (") or single quotes ('). When the name is quoted, the quotes are removed, but the name is not otherwise modified. If the name is not quoted, the first control character terminates the name on Windows and the first white space character terminates the name on UNIX. On Windows, trailing spaces are removed from unquoted names.

The old- and new-name data item must be less than 1024 characters in length.

Previous Topic Next topic Print topic