首页 > 解决方案 > 如何计算分配给 VSAM 文件的空间

问题描述

我正在创建一个工具,该工具将根据记录数、记录长度和块大小参数估计应为 VSAM 文件分配的空间。在浏览互联网上的不同来源时,我在 IBM 网站上得到了一篇关于空间计算的文章,如下所示,但我不明白一些信息,例如第 5 点中的 33 来自哪里,以及 CI 中如何获取 10% 和 20%和 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.

标签: mainframevsam

解决方案


CA 和 CI 上的可用空间(百分比)由 DEFINE CLUSTER IDCAMS 命令中的 FREESPACE 参数确定。上述公式中的值仅作为示例。如果 VSAM 的定义不同,您应该更改它。

3390 的最大轨道大小为 56664,但您必须记住用于扇区间间隙的空间。更多的部门 - 更多的差距,更少的可用数据空间。33 是 3390 轨道上块大小在 1019 和 1086 之间的最大块数(您可以在 bitavers 文档“IBM 3390 Direct Storage Access Reference”上找到该计算和参考表)


推荐阅读