Setting Sequential File Characteristics

The ANSI standard specifies that when a process CLOSEs and then reOPENs a device, GT.M restores any characteristics not explicitly specified with deviceparameters to the values they had prior to the last CLOSE. However, because it is difficult for a large menu-driven application to ensure the previous OPEN state, GT.M always sets unspecified sequential file characteristics to their default value on OPEN. This approach also reduces potential memory overhead imposed by OPENing and CLOSEing a large number of sequential files during the life of a process.

GT.M does not restrict multiple OPEN commands. However, if a file is already open, GT.M ignores attempts to modify sequential file OPEN characteristics, except for RECORDSIZE and for deviceparameters that also exist for USE.

Sequential files can be READONLY, or read/write (NOREADONLY). Disk files can also be SHARED or exclusive. A file OPENed SHARED can accommodate a theoretically unlimited number of readers and a single writer. OPENing a file SHARED complicates access to the file, and therefore significantly reduces the performance of I/O to that file.

Sequential files can be composed of either FIXED or VARIABLE (NOFIXED) length records. By default, records have VARIABLE length. A BLOCKSIZE for VARIABLE length records must specify at least four bytes more than the maximum record length. In order to use FIXED length records, the command must explicitly include the FIXED deviceparameter. Changing the RECORDSIZE for FIXED length record files produces subsequent errors on READ or WRITE.

VMS enforces its standard security when GT.M OPENs a Files-11 RMS file. This includes any directory access required to locate or create the file. If you are unable to OPEN a file, contact your system manager.