Why we need Variable blocked files?

2 posts / 0 new
Last post
Why we need Variable blocked files?

I am new to mainframes, I have seen files in my project defined as variable blocked (VB) files, and there are some files defined as fixed block files. 

Why do we need to create variable block files ?

Joined: 07/07/2011 - 19:59
Variable Blocked Files.
In non mainframe architectures, All files are essentially variable record length files, in that each record may not have the same record length as the previous record and the end of the record is determined by special characters such as carriage return and line feed. In mainframe environment record are not delimited in this way. A file's structure will be pre-determined when the file is defined as either fixed record length or variable record length. Variable record length records have 4 byte field at the start of the record to say how long the record actually is. The reason we cater for variable record length file is because most files contain different record types and each record type will have a different record structure. Each record structure will have its own length. Large amounts of space are saved in this way. In the "old days" when disk space was very expensive, many shops would save further space on a file by creating some form of compression technique to compress the data down. One such example i came across had a field at the beginning of the record, and this field was examined bit for bit to determine whether particular field's where on the record or not. A program was written so that when the file was read it would read the record and expand the record according to the compression algorithm, and when a record was written it would do the reverse.
Log in or register to post comments
Sponsored Listing