Fd Entry - Value Of Owner-Id Clause; Sharing Files; Unshared Files; Shared Files - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

FD Entry - VALUE OF OWNER-ID Clause
Sharing Files
Unshared Files
Shared Files
You can write a VALUE OF OWNER-ID clause in the field description (FD)
entry. This clause allows you to control the use of protected diskette volumes
by the operator.
The operator must fill in the Owner-id field (1) if the volume is protected and
(2) if you don't code a VALUE OF owner-id clause under the FD entry in
your program.
Whether or not a volume is protected is determined by the setting of the
accessibility byte. This byte is set under the "modify volume label" option of
the diskette label maintenance utility. See Utilities Reference/Operations
Manual for detailed information on how to protect a volume.
The VALUE OF owner-id clause is coded as follows:
FD
file-name
VALUE OF OWNER-ID IS "BELL"
LABEL RECORDS ARE STANDARD.
In the above example the owner-id BELL was specified when the data set was
initialized with the diskette initialization utility (also described in the Utilities
Reference/Operations Manual).
Sharing files refers to the use of a file by more than one program executing at
the same time. The ability of another program to use a file at the same time
as your program depends on how the following COBOL language statements
are coded in the two programs:
The SHARE option in the SELECT clause.
The OPEN verb, in which the modes OUTPUT, 1-0 (for update),
INPUT, or EXTEND mode can be coded.
In general, you can code your program so that diskette files are:
Unshared
Shared read
Shared read/write
When a file is unshared, only the program that opens the file has access to it,
both for reading and for writing. If another program attempts to access the
file, the requesting program will receive Status Key value of 93. This
indicates the file is already opened. Files are always unshared unless you
specifically specify otherwise, as will be shown later in this chapter.
When you specify SHARER (for shared read) in the FILE-CONTROL
paragraph, another program can access the file for reading data, but cannot
update it.
When you specify SHARE (for shared read and shared read/write) files can
be accessed by more than one program at a time. All programs can both read
and write to the file.
Chapter 5. Diskette Input/Output
5- 5

Advertisement

Table of Contents
loading

Table of Contents