This pages aims to explain the different record format types, and is therefore also useful in understanding the meaning of the RECFM parameter on DD statements within the Job Control Language.
Fixed Length Records Unblocked - RECFM=F |
|||||||
Record 1 |
  | Record 2 |
  | Record 3 |
  | Record 4 |
  |
When all records in the data set are exactly the same size as each other, the data set can be considered to be of Fixed Length format. In the above example each record appears as a discreet entity. This is not an efficient way of storing data as it increases the capacity requirement, and has a detrimental effect on performance in batch processes by generating the need for a physical I/O operation for each record.
Fixed Length Records Blocked - RECFM=FB(S) |
|||||||
Record 1 |
Record 2 |
  | Record 3 |
Record 4 |
  |   |   |
The illustration above also relates to a fixed length format data set, but with records grouped into bigger blocks. The block size (BLKSIZE) must be a direct multiple of the logical record length (LRECL). The easiest way of achieving the optimum block size for the device being used is to code BLKSIZE=0 in the program or Job Control. This allows the System to Determine the Blocksize (SDB).
What is a standard blocked data set as indicated by the optional S ? Click for S the explanation.
Variable Length Records Unblocked - RECFM=V |
|||||||||||
Record 1 |
  | Record 2 |
  | Record 3 |
  | Record 4 |
  | ||||
On occasions records in the data set may be of different sizes due to having different field content and in these circumstances the data set is deemed to be of Variable format. In the above example each record appears as a discreet entity, note that each record has a prefix. Clicking on RDW will present an explanation. As with fixed format, writing individual records is not efficient. The Job Control implication for variable length record data sets is that the LRECL must be equal to the largest record, plus 4 bytes.
Variable Length Records Blocked - RECFM=VB |
|||||||||||
Record 1 |
Record 2 |
  | Record 3 |
Record 4 |
  | ||||||
The illustration above also relates to a variable length format data set, but with records grouped into bigger blocks. With variable length records, the block size (BLKSIZE) will not be a direct multiple of the logical record length (LRECL), so ensure the optimum block size for the device let the system determine it. Note that each block also has a prefix. Clicking on BDW will present an explanation.
Variable Length Records Blocked Spanned - RECFM=VBS |
|||||||||||
Record 1 Part 1 |
  | R1 Part 2 |
Record 2 |
  | |||||||
In some variable format data sets, the record length can be greater than the blocksize. In these situations it is possible to segment the record across blocks. This technique is known as spanning. (SMF data is written in spanned record format.)
Note the gaps between blocks of records. It is possible to declare RECFM=U or udefined format. When this format is declared the system will read all the data between the Inter-Block Gaps (IBGs) and treat the data as a record. For this to work successfully, the BLKSIZE specified must be the largest for the device type, i.e. 32K for 3390, or 64K for 3490E.
When either A or M are included in the RECFM value they indicate that the first byte of the record is to be used as a control character. Control Characters are used by some devices, such as impact printers, to control the placement of the rest of the data in the record. This means that the first byte will not appear on any visual output produced. The respective values are:
Of the two, the A value is, or was, the most common. Whilst it could be used to direct punch cards to a specific stacker on a device like the old 2540 Card Reader Punch, the most likely use was for positioning output on a page when an impact printer is being used. This provides a direct link with the Forms Control Block (FCB). Some typical ASA control character values might be:
Single numeric values would cause a skip to that channel either in the carriage control tape or the FCB which ever was being used, either before of after printing a line. (See Cobol AFTER/BEFORE ADVANCING clauses.) A blank ASA control character would produce single line spacing.
Copyright © KMS-IT Limited 2002, 2003