Including Multi-User Syntax in Your Program [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation
COBOL/HP-UX Operating Guide for the Series 700 and 800
Including Multi-User Syntax in Your Program
This section describes the additional syntax you must include to allow
your programs to be run in a shared file environment. You do not have to
use program calls to make your files shareable, because file sharing is
handled with COBOL syntax. All of the syntax that is used to make data
files shareable is an extension to the ANSI 1985 standard X3.23, and this
syntax is based on IBM's 8100 DPPX multi-user specification, though it
does not implement that specification. All X/Open multi-user features
are supported.
With the extra syntax you can make data files shareable or lock an entire
file. The latter is an exclusive lock which denies access to the file by
other operators.
Existing programs written using previous Micro Focus COBOL products can
be easily modified to make them suitable for use in a shared file
environment. If you require the default locking, all you have to do is
submit your original source programs to the cob command. For any other
kind of locking you must add the required syntax to your source program
before submitting it to the cob command. If your program does not
already contain a status item then you must declare one in your program,
and you must also add any code you require to handle specific status
information. When a file status data item is included in your program,
whenever the program tries to access a file a status is returned in this
data item. From the value in this data item you will know whether the
operation was successful or not. See the section Input-Output Error
Handling in Chapter 18 , File Status for details.
MPE/iX 5.0 Documentation