30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2. <strong>File</strong> processing<br />

This chapter discusses basic aspects of processing files. Topics include:<br />

v <strong>File</strong> operations supported by the system for use in high-level language programs<br />

v <strong>File</strong> security considerations<br />

v Sharing files in the same job<br />

v Allocating file resources<br />

v Temporarily changing a file when a program uses it<br />

v Feedback areas maintained by the system<br />

v Handling file errors when programs run<br />

<strong>File</strong> <strong>Management</strong> operations overview<br />

<strong>File</strong> management supports many operations that high-level language programs can<br />

use to process data. These include the following, which are grouped by category:<br />

v <strong>File</strong> Preparation<br />

OPEN Attaches a file to a program and prepares it for I/O operations. A file<br />

may be opened for any combination of read, write, update, or delete<br />

operations.<br />

ACQUIRE<br />

Attaches a device or establishes a communications session for an open<br />

file in preparation for I/O operations.<br />

v Input/Output<br />

READ Transfers a record from the file to the program. The data is made<br />

available to the program once the read has been successfully completed.<br />

WRITE<br />

Transfers a record from the program to the file.<br />

WRITE-READ<br />

Combines the WRITE and READ operations as one operation.<br />

UPDATE<br />

Updates a record with changed data. The record must have been<br />

successfully read prior to the update operation.<br />

DELETE<br />

Deletes a record in a file. The record must have been successfully read<br />

prior to the delete operation.<br />

v Commitment Control<br />

COMMIT<br />

Guarantees a group of changes are made as a complete transaction<br />

across multiple records or multiple files.<br />

ROLLBACK<br />

Rolls back a group of changes to the point of the last commit operation.<br />

v Completion<br />

FEOD Positions the file at the last volume or at the end of data. For those<br />

© Copyright <strong>IBM</strong> Corp. 1998, 2000 3

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

Saved successfully!

Ooh no, something went wrong!