如何计算分配给 VSAM 文件的 space

How to calculate space allocated to VSAM files

我正在创建一个工具,它会根据记录数、记录长度和块大小参数估计 space 应该提供给 VSAM 文件。 在浏览互联网上的不同资源时,我在 IBM 网站上获得了一篇关于 space 计算的文章,如下所示,但我不明白一些信息,例如,第 5 点中的 33 来自哪里,还有 10% 和 20% 是如何计算的正在 CI 和 CA.

Device type. 3390
Unit of space allocation. Cylinders
Data control interval size. 1024 bytes
Physical block size (calculated by VSAM). 1024 bytes
Record size. 200 bytes
Free space definition – control interval. 20%
Free space definition – control area. 10%
Number of records to be loaded. 3000

You can calculate space for the data component as follows:

1. Number of bytes of free space (20% × 1024) = 204 (round down)
2. Number of loaded records per control interval (1024–10–204)/200 = 4.
3. Number of physical blocks per track = 33.
4. Number of control intervals per track = 33.
5. Maximum number of control intervals per control area (33 x 15) = 495.
6. Number of loaded control intervals per control area (495 - 10% x 495) = 446.
7. Number of loaded records per cylinder (4 x 446) = 1784.
8. Total space for data component (3000/1784) (rounded) = 2 cylinders.

The value (1024 – 10) is the control interval length minus 10 bytes for two RDFs and one CIDF. The 10. record size is 200 bytes. On an IBM 3380, 31 physical blocks with 1024 bytes can be stored on one track. The value (33 × 15) is the number of physical blocks per track multiplied by the number of data tracks per cylinder.
CA 上的

Free space(百分比)和 CI 由 DEFINE CLUSTER IDCAMS 命令中的 FREESPACE 参数确定。上面公式中的值只是示例。如果 VSAM 的定义不同,你应该改变它。

3390 的最大轨道大小为 56664,但您必须记住 space 用于区间间隙。更多部门 - 更多差距,更少可用的数据 space。 33 是块大小在 1019 和 1086 之间的 3390 磁道上的最大块数(您可以在 bitsavers 文档“IBM 3390 直接存储访问参考”中找到计算和参考 table)