24.12.2013 Views

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

TOPS-10 Monitor Calls Manual Volume 2 AA-K039D ... - Trailing-Edge

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RENAME [OPCODE 055]<br />

22.137 RENAME [OPCODE 055]<br />

FUNCTION<br />

Performs one or more of the following functions:<br />

o Alters file attributes, including the file name,<br />

extension, and access privilege code of the file.<br />

file<br />

o<br />

o<br />

o<br />

Changes an SFD name.<br />

Deletes the specified file.<br />

Performs an implicit CLOSE.<br />

Use FILOP. to perform a RENAME on an extended I/O channel.<br />

CALLING SEQUENCE<br />

RENAME channo,addr<br />

error return<br />

skip return<br />

In the calling sequence, the program supplies the following variables:<br />

o channo is the number of an initialized channel. If the<br />

channel is an extended channel, use FILOP. function . FORNM.<br />

o<br />

addr is the address of the argument list.<br />

rs--equivalent to that of LOOKUP and<br />

described in Section 11.13.<br />

The argument list<br />

ENTER calls and is<br />

RENAME has two forms of argument block: the four-word block and the<br />

extended argument block. The short-form (4-word) argument list is<br />

described in Section 11.13.1. The extended argument list is described<br />

in section 11.13.2. For DECtape files, refer to Chapter 13 for<br />

descriptions of the arguments.<br />

The only way that your program can RENAME a file into or out of an SFD<br />

1S to refer to an explicit path using the PATH. argument block (by<br />

including an [XWD O,addr] instruction as the PPN argument). If a<br />

RENAME is given that attempts to move a file into or out of an SFD<br />

without specifying an explicit path, it will take the skip return<br />

(assuming no other errors), but the file will not change directories.<br />

To delete a file after all read references have been made, your<br />

program should specify the value of zero in the address of the file<br />

name word in the RENAME block.<br />

A delete function on a channel that is open for output, to supersede a<br />

file, simply aborts the creation of the new file. This is equivalent<br />

to a CLOSE with CL.RST set.<br />

Although only a privileged job can delete a UFD, an unprivileged job<br />

can delete an empty SFD. Note that you must set your path to a<br />

different area before you can delete the current SFD. If the<br />

directory is not empty or if a job is currently using the directory,<br />

the monitor returns the DIRECTORY NOT EMPTY error code.<br />

A CLOSE is optional after a RENAME because a RENAME implicitly<br />

performs a CLOSE. A CLOSE should not be issued between a LOOKUP and a<br />

RENAME if the file is not in the def~ult direc,tory path, because the<br />

CLOSE erases all memory of the path. If RENAME is performed and the<br />

file is not in the default path, the monitor returns the FILE NOT<br />

FOUND error in the right half of addr+l.<br />

22-349

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!