COBOL Manual for TNS and TNS/R Programs

Disk Input and Output
HP COBOL Manual for TNS and TNS/R Programs522555-006
28-6
Fixed-Length and Variable-Length Records
If a Pathway server written in HP COBOL creates a file, the security of the file is that of
the DEFAULT command active when the monitor process (PATHMON process)
governing the server class starts to execute.
Accessing Files on Other Nodes
For you, as a user on one node, to have any access at all to a file on another node,
even when the file’s security attributes permit it, you must have two remote passwords
declared on each node. The TACL command REMOTEPASSWORD enables you to
set the remote passwords on your own node. You must arrange with the system
manager of the other node to have the same two passwords established on that node.
For further information about remote passwords, see the Guardian Users Guide.
Fixed-Length and Variable-Length Records
A file has variable-length records if its file description entry has either:
A RECORD CONTAINS m TO n CHARACTERS clause
A RECORD IS VARYING FROM m TO n clause
No RECORD clause and different-sized record descriptions
If your source program does not explicitly describe a file as having variable-length
records, the HP COBOL run-time write routine writes fixed-length physical records. The
length of each physical record in the file is the larger of:
The length of the longest record description entry for the file
The maximum record length explicitly stated in the RECORD clause of the file
description entry
If a file contains records of different lengths, your program must declare it as having
variable-length records to be able to read it. If the program declares the file (explicitly
or implicitly) as having fixed-length records, and the program then tries to read a record
shorter than the declared length, the read operation succeeds with a file status code
“04.”
Unstructured files must have fixed-length records.
Exclusion Modes
The exclusion mode is a feature of a file that determines whether other processes can
read or write to the file being opened. If two separate processes are both writing to the
same file, it is possible that both will attempt to write the same record and thereby
corrupt the database.