Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

X 5.2.10.1 Under OS/390 and VM




X The RECORDING MODE clause specifies the format of the physical records in
X a QSAM file. The clause is ignored for a VSAM file.


X Permitted values for RECORDING MODE are:


X Recording Mode F (Fixed)

X All the records in a file are the same length and each is wholly
X contained within one block. Blocks can contain more than one record,
X and there is usually a fixed number of records for each block. In
X this mode, there are no record-length or block-descriptor fields.


X Recording Mode V (Variable)

X The records can be either fixed-length or variable-length, and each
X must be wholly contained within one block. Blocks can contain more
X than one record. Each data record includes a record-length field and
X each block includes a block-descriptor field. These fields are not
X described in the Data Division. They are each 4 bytes long and
X provision is automatically made for them. These fields are not
X available to you.


X Recording Mode U (Fixed or Variable)

X The records can be either fixed-length or variable-length. However,
X there is only one record for each block. There are no record-length
X or block-descriptor fields.


X Note: You cannot use RECORDING MODE U if you are using the BLOCK
X CONTAINS clause.


X Recording Mode S (Spanned)

X The records can be either fixed-length or variable-length, and can be
X larger than a block. If a record is larger than the remaining space
X in a block, a segment of the record is written to fill the block. The
X remainder of the record is stored in the next block (or blocks, if
X required). Only complete records are made available to you. Each
X segment of a record in a block, even if it is the entire record,
X includes a segment-descriptor field, and each block includes a
X block-descriptor field. These fields are not described in the Data
X Division; provision is automatically made for them. These fields are
X not available to you.


X Note: When recording mode S is used, the BLOCK CONTAINS CHARACTERS clause
X must be used. Recording mode S is not allowed for ASCII files.


X If the RECORDING MODE clause is not specified for a QSAM file, the COBOL
X for OS/390 & VM compiler determines the recording mode as follows:


X F
The compiler determines the recording mode to be F if the largest
X level-01 record associated with the file is not greater than the block
X size specified in the BLOCK CONTAINS clause, and you do one of the
X following:

  • X Use the RECORD CONTAINS integer clause (for more information, see
    X IBM COBOL for OS/390 & VM Compiler and Run-Time Migration Guide.)
    
    
  • X Omit the RECORD clause and make sure all level-01 records
    X associated with the file are the same size and none contain an
    X OCCURS DEPENDING ON clause.
    
    


X V
The compiler determines the recording mode to be V if the largest
X level-01 record associated with the file is not greater than the block
X size specified in the BLOCK CONTAINS clause, and you do one of the
X following:

  • X Use the RECORD IS VARYING clause
    
    
  • X Omit the RECORD clause and make sure all level-01 records
    X associated with the file are not the same size or some contain an
    X OCCURS DEPENDING ON clause
    
    
  • X Use the RECORD CONTAINS integer-1 TO integer-2 clause with
    X integer-1 the minimum length and integer-2 the maximum length of
    X the level-01 records associated with the file. The two integers
    X must be different, with values matching minimum and maximum length
    X of either different length records or record(s) with an OCCURS
    X DEPENDING ON clause.
    
    


X S
The compiler determines the recording mode to be S if the maximum
X block size is smaller than the largest record size.


X U
Recording mode U is never obtained by default. The RECORDING MODE U
X clause must be explicitly used.


Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.