RECSIZ

Specify a record size for a file

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
RECSIZ:record_size

record_size

One of the following values: (n)

n = Set the record size to n for the file being opened.

0 = Ignore the RECSIZ qualifier.

-1 = Set the record size to the length of the first record in the file.

The RECSIZ qualifier is only supported for non-ISAM files.

The RECSIZ qualifier sets a record size for the file being opened.

On Windows and Unix, if you use the RECSIZ qualifier, the records of the file are accessed as fixed-length records of the specified size. By default, the record size of the file being opened is equal to the size of the destination data area on the first I/O operation. Before the first I/O, the record size is undefined.

On OpenVMS, record_size is the record size for the file being opened; the values 0 and -1 are not valid. If you’re creating a relative file on OpenVMS, the ­RECSIZ qualifier is required. If you’re opening a relative file for input, RECSIZ is not required, but it is checked and an “Invalid record size” error ($ERR_IRCSIZ) occurs if the values do not match. If you are creating a sequential file, this qualifier sets the maximum record size allowed for the file, unless system option #35 is set. If option #35 is set, Synergy DBL accesses the file’s records as fixed-length.   

Important

If the file is empty, do not use RECSIZ:-1 to set the record size to the length of the first record in the file.

Tip

If the records in the file possibly contain integer data and you want to use RECSIZ:-1, you can put a “dummy” record at the beginning of the file that does not have any integer data. This enables Synergy DBL to determine the correct record size for the file.

OPEN statement