如何计算分配给 VSAM 文件的空间

Posted

技术标签:

【中文标题】如何计算分配给 VSAM 文件的空间【英文标题】:How to calculate space allocated to VSAM files 【发布时间】:2021-02-02 11:34:49 【问题描述】:

我正在创建一个工具,该工具将根据记录数、记录长度和块大小参数估计应为 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.

【问题讨论】:

关于 #5 的问题,请参阅 3 和 4 @Hogstrom 但是每个轨道的物理块可以是 33。 文章有参考吗? @Hogstrom 是的,我在这里得到了这个'ibm.com/support/knowledgecenter/SSLTBW_2.2.0/…' 【参考方案1】:

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

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

【讨论】:

感谢您的解决方案,它真的很有帮助。

以上是关于如何计算分配给 VSAM 文件的空间的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu12.04如何给未分配空间创建新分区并且挂载上呢?

没有未分配空间的centos7上如何模拟出sdb

在C语言中,如何给函数分配内存?

如何扩大电脑磁盘容量

如何重新分配磁盘空间?

求Linux系统如何分配空间