GSAM record formats
GSAM records are nonkeyed. For variable-length records you must include the record length as the first 2 bytes of the record. Undefined-length records, like fixed-length records, contain only data (and control characters, if needed).
If you use undefined-length records, record length is passed between your program and GSAM in the
4-byte field that follows the key feedback area of the GSAM DB PCB. It is called the
undefined-length records area. When you issue an ISRT call, supply the length. When
you issue a GN or GU call, GSAM places the length of the returned
record in this field. The advantage of using undefined-length records is that you do not need to
include the record length at the beginning of the record, and records do not need to be of fixed
length. The length of any record must be less than or equal to the block size (BLKSIZE) and greater
than 11 bytes (an z/OS® convention).
If you are using VSAM, you can use blocked or unblocked fixed-length or variable-length records. If you are using BSAM, you can use blocked or unblocked fixed-length, variable-length, or undefined-length records. Whichever you use, be sure to specify this on the RECFM keyword in the DATASET statement of the GSAM DBD. You can override this in the RECFM statement of the DCB parameter in the JCL. You can also include carriage control characters in the JCL for all formats.