Table 1 shows the defaults for LRECL and BLKSIZE when z/OS® XL C/C++ is creating a file, not appending or updating it. The table assumes that z/OS XL C/C++ has already processed any information from the fopen() statement or ddname. The defaults provide a basis for fopen() to select values for unspecified attributes when you create a file.
lrecl specified? | blksize specified? | RECFM | LRECL | BLKSIZE |
---|---|---|---|---|
no | no | All F | 80 | 80 |
All FB | 80 | maximum integral multiple of 80 less than or equal to max | ||
All V, VB, VS, or VBS | minimum of 1028 or max–4 | max | ||
All U | 0 | max | ||
yes | no | All F | lrecl | lrecl |
All FB | lrecl | maximum integral multiple of lrecl less than or equal to max | ||
All V | lrecl | lrecl+4 | ||
All U | 0 | lrecl | ||
no | yes | All F or FB | blksize | blksize |
All V, VB, VS, or VBS | minimum of 1028 or blksize–4 | blksize | ||
All U | 0 | blksize | ||
Note: "All" includes the standard (S) specifier for fixed
formats, the ASA (A) specifier, and the machine control character
(M) specifier.
|
For more information about specific default block sizes, refer to z/OS DFSMS Using Data Sets.
For DASD files that do not have recfm=U, if you specify blksize=0 on the call to fopen() or freopen(), the system determines the optimal block size for your file. If you do not have the correct level of DFP or you specify blksize=0 for a ddname instead of specifying it on the fopen() or freopen() call, z/OS XL C/C++ behaves as if you had not specified the blksize parameter at all.
For information about block sizes for different categories of I/O, see the topics listed in Table 1.
To determine the maximum LRECL and BLKSIZE values for the various file types and devices available on your operating system, refer to the topics listed in Table 1.