COBOL Manual for TNS and TNS/R Programs

Data Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
7-17
File Description Entries
°
Unstructured Disk Files
If the actual file associated with the COBOL file at open time is an unstructured
disk file, then blocking/deblocking occurs if the logical record size is an even
number of character positions or the file has the odd-length access attribute;
otherwise the BLOCK CONTAINS clause is ignored (that is, logical records are
physically read or written one at a time). (To have the odd-length access
attribute, a file must be created with FUP CREATE and ODDUNSTR must be
specified.)
Odd-length records are written as even-length unless ODDUNSTR is active.
The compiler issues a warning if blocking is specified when the conditions,
other than variable-length records, are not satisfied.
RECORD CONTAINS Clause
Use the RECORD CONTAINS clause to specify whether the records of a file are of
fixed or variable length and to document the size of the records.
contains-phrase-fixed
length-fixed
is an unsigned integer literal that specifies the exact length, in characters, of
fixed-length records. Its value is in the range 0 through 32,767.
RECORD
contains-phrase-fixed
«contains-phrase-range»
VARYING phrase
VST078.vsd
length-fixed
CONTAINS
CHARACTERS
VST079.vsd