What is the difference between BLKSIZE and LRECL?

Answer Posted / stu

Data is read and written to files in blocks. The reading
and writing of blocks is I/O. I/O is overhead (increases
runtime and cost) and you want to keep it to a minimum.

When reading a file, a whole block of records will be read,
but the records in the block will be fed to the program one
at a time until the block is exhausted and the next block is
read. The operating system does this behind the
scenes--it's transparent to the programmer.

When writing to a file, the records are not actually written
to the file until a block is full (or the program ends--at
which time the last block is written if it contains at least
1 record.) Again, this is transparent to the programmer.

Obviously, to keep I/O low, you want the cram as many
records into a block as possible.

Let's say your FB file's record length (LRECL) is 252 bytes
and your facility allows block sizes up to 27000 bytes.
Your blocksize would be ((integer (27000 / 250)) * 252) or
26964 (107 records).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?

704


What is the function of the dd mgmtclas keyword in sms datasets?

743


List the various advantages of using jcl language?

855


by using cond parameter maximum 8 cond can be coded in single cond means ?explain

979


Is condition checking possible in jcl?

722






what is “Cond= even” and “Cond=only”?

744


What is one line to pass PARM from JCL to COBOL?

902


Name the statement which can be used to send data to another mvs jes3 node?

607


How to override loadlib?

1432


how you can access an uncataloged dataset in a JCL?

656


List in order the hierarchical levels of jcl?

672


what is use of disp parameter in dd statement?

667


Explain the function of //jcllib statement?

708


How to alter the parameters for the existing gdg?

716


Is it possible to define dd statements as you want?

646