• Aucun résultat trouvé

FILOP. Functions

Dans le document TOPS-10 Monitor Calls Manual Volume 2 (Page 158-165)

The function codes and their meanings are described below. include the LOOKUP/ENTER block pointer for directory devices when you are using this function.

Creates the file described by the LOOKUP/ENTER block. This function strictly requires creation of the file; if a matching file is found in the directory, the error return is taken. The LOOKUP/ENTER block pointer is required for the

.FOCRE function.

Writes the file described by the LOOKUP/ENTER block. This function supersedes any matching file in the directory, or creates a new file. The LOOKUP/ENTER block pointer is required for the

. FOWRT function .

4 . FOSAU

5 . FOMAU

6 . FOAPP

7 .FOCLS

10 . FOURB

FILOP. [CALLI 155]

Updates the file described by the LOOKUP/ENTER block in exclusive access mode. No other user can write to this file until i t is closed. The LOOKUP/ENTER block pointer is required for the .FOSAU function. If the specified file does not exist, i t will be created automatically for this function.

Updates the file described by the LOOKUP/ENTER block, in multi-access mode. This allows other users to read and write the file. The LOOKUP/ENTER block pointer is required for the

.FOMAU function.

Appends to the file described in the LOOKUP/ENTER block. Note that if the buffers were built by this FILOP. call, th~ last block of the file will be read into the first buffer. The byte count and byte pointer are set to write data immediately after the last word of the file. The LOOKUP/ENTER block pointer is required for the .FOAPP function.

Closes the file associated with the channel specified in the word at addr. This function requires a special argument list:

addr: EXP channo

EXP CLOSE-flags

Include the CLOSE flags from the CLOSE UUO in addr+l.

The monitor executes a GETSTS call for the file.

The I/O status bits are returned in the ac. For a list of I/O status bits, refer to the appropriate device chapter in Volume 1.

Checkpoints the file associated with the channel specified in the word at addr. Only the function word of the FILOP. argume~block is required.

The monitor writes all output buffers to disk, updates directories, updates checksums in RIB pointers, and updates the end-of-file pointer.

The file remains open for further I/O.

The .FOURB function is meaningful only for files that are being written.

NOTE

If output is not complete, the monitor writes the last partially filled word;

this may leave null bytes in the word.

FILOP. [CALLI 155]

11 .FOUSI

12 .FOUSO

13 . FORNM

14 . FODLT

Performs a USETI monitor call (specifies next block number to be input) for a specified block of the file associated with the channel specified at addr, setting that block for next input. The format of the argument l i s t for the .FOUSI function ~s:

addr: XWD EXP

channo, . FOUSI blockno

In the argument list, channo and blockno give the channel number and block number of the file.

Refer to the USETI call for more information.

On a skip return, the I/O status bits are returned in the ac. The monitor takes the error return i f the bloc~number is larger than the specified file or no previous LOOKUP was executed. .FOUSI returns error code %ERILU i f the argument block is not exactly two words long.

Performs a USETO monitor call for a specified block of the file associated with the channel specified at addr, setting that block for next output. The~rmat of the argument l i s t for the

.FOUSO function is:

addr: XWD EXP

channo, .FOUSO blockno

In the argument list, channo and blockno give the channel number and block number of the file.

Refer to the USETO call for more information.

The monitor takes the error return i f not enough space is available or no previous ENTER was executed. The I/O status word is returned in the ac for a successful return. .FOUSO returns error code %ERILU if the argument block is not exactly two words long.

Renames the file described by the RENAME block.

The LOOKUP/ENTER block pointer and the RENAME block pointer are required for the . FORNM function, unless the file is already open on the specified channel. However, if a file is open on the channel specified in . FOFNC, and i f you set the flag FO.UOC in the same word, then the right half of . FOLEB is ignored, and the function is performed on the open file.

Deletes the file described by the LOOKUP block.

Pointers to both LOOKUP and RENAME blocks are required for this function, unless you set the flag FO.UOC, and a file is open on the channel specified in .FOFNC. In this case, the right half of .FOLEB is ignored and the function is performed on the open file.

15 . FOPRE

FILOP. [CALLI 155]

Performs GETSTS monitor call.

are returned in the ac. not changed. This duplicates but allows you to use extended

Clears a DECtape directory. Duplicates the UTPCLR call. The argument list for this function is: extended RENAME argument block.

33 .FOFIL

34 .FOFXI

FILOP. [CALLI 155]

Returns the file specification of the file that is open on this channel. To return the file specification as well as to perform another function, include' Word 10 (.FOFSP) in the argument block instead of using the .FOFIL function. The argument list for this function is:

addr: XWD XWD

channo, .FOFIL len,addr2

The second word contains the length (len) and address (addr2) of the block where the file specification should be stored. This block format is described in the SKIP RETURN section.

Performs an IN addressing and is:

monitor call, dump mode I/O.

using extended The argument list addr: XWD

addrl addr2

channo, .FOFXI

In the argument list:

o channo is the channel number from which data is read from the opened file.

o addrl is the address of the command list, which has a two-word format:

1. The first word of each command word pair contains the length of the command list.

2. The second holds the performed.

address in of the next length and of the list

word of. each command word pair address where I/O should be If the length is zero, the the second word is the location command list. When both the the address are zero, the end has been encountered.

o addr2 is the optional address of a word containing the block number of the file to perform a USETI to before reading.

The I/O status bits are returned in the ac.

FILOP. [CALLI 155]

35 . FOFXO Performs an OUT monitor call, using extended addressing and dump-mode I/O. The argument list is:

addr: XWD addr1 addr2

channo, .FOFXO

In the argument list:

o channo is the channel number on which data is written to the opened file.

o addr1 is the Conunand list

.FOFXI.

address format

of is

the conunand list.

described above in o addr2 is the (optional) address of a word containing the block number of the file to perform a USETO to before writing.

The I/O status bits are returned in the ac.

22.48.3 Simu1taneous Fi1e Access with FILOP. UUO

Multiple channels of a single job and/or multiple jobs can update a file simultaneously using FILOP. The monitor imposes no restrictions or interlocks when a file is being simultaneously updated. Therefore, users must ensure that separate jobs do not update the same block of the same file at the same time. The ENQ/DEQ Facility (refer to Chapter 8) may be used to ensure that such interference does not occur, but the monitor does not require its use when simultaneously updating a file.

To update a file simultaneously, your program performs a FILOP. monitor call using function code 5 (.FOMAU). A file can be updated in thi~ manner when the file is idle, when i t is being read, or when i t 1S being updated by other jobs. A file cannot be simultaneously updated if the file is in single-access update mode;

that is, when a LOOKUP and an ENTER have been performed or a FILOP. has been performed with Function code 4 (.FOSAU) or Function 6

(. FOAPP) .

Note that although an extended LOOKUP/ENTER/RENAME block can be specified by the FILOP. monitor call, your program cannot change the file attributes of a simultaneously updated file. The FILOP. monitor call uses the first four words of the extended argument list.

In order to prevent excessive monitor overhead, files that are to be simultaneously updated should be pre-allocated into contiguous blocks, if possible. This will prevent the creation of inefficient retrieval pointers, and will lessen the chance that extended RIBs will be created.

FILOP. [CALLI 155]

SKIP RETURN

The requested function has been performed.

The file specification is returned when you use function .FOFIL or when you specify an address in .FOFSP (Word 10 in the argument block) . For .FOFSP, the following data block is returned at the address you specify in the right half of the word. For .FOFIL, this data is returned in the argument block at addr2.

Word 0 1 2 3 4 5

6-10

Symbol Contents

. FOFND Reserved for use by DIGITAL.

. FOFDV Device name.

. FOFFN File name.

. FOFEX File extension.

. FOFPP PPN.

. FOFSF First SFD .

Subsequent levels

Words 5 through appropriate.

10

NOTE are

of SFDs.

returned only where The returned block is ended by a zero word. When you reserve the block for the file specification, be sure to include space for this zero word.

ERROR RE TURN

Error codes are returned in the ac for the FILOP. call. If -1 is returned in the ac, an invalid argument list was supplied. Other error codes are identical to those used by LOOKUP/ENTER. These are listed in Section 11.14, in Volume 1. Several functions return the I/O status word, as mentioned in the function ~escriptions.

RELATED CALLS

0 CLOSE,

0 ENTER

0 GETSTS

0 IN/INPUT

0 LOOKUP

0 MTAPE

0 OPEN

Dans le document TOPS-10 Monitor Calls Manual Volume 2 (Page 158-165)

Documents relatifs