Overview
Space is an essential statement in jcl to obtain space for a new file. The following is only for the DASD qsam file (including the GDG version file ).
Syntax: Space = (Unit ,(Primary quantity, secondary quantity),...)
Principles
- When a new file is created, the size of the Space declared by primary quantity is allocated for the first time. If not, the space declared by secondary quantity is allocated again. Secondary quantity can be allocated for 15 times. If it is declared that space can be allocated from multiple volume instances, each volume instance can be allocated 16 secondary quantity times starting with the second volume.
- If dsntype = large is not used, a file can obtain a maximum of 65535 trks (4639 cyls)
- The available space of a disk is limited. Therefore, the size of the space available for dsntype = large is limited by the space available for disk allocation.
- If the value of primary quantity is greater than the remaining space available for a volume, this step will be abend directly.
Example
1. Space = (CYL, (15, 5), rlse), unit = (disk, 10)
Maximum allocable space: 15 + 5*15 + 5*16*9 = 810 cyls
Allocate 15 + 5*15 = 90 cyls on the first volume and 5*16 = 80 cyls on the second to nine volume.
2. Space = (CYL, (1500,500), rlse), unit = (disk, 25)
Maximum allocable space: 1500 + 500 *5+ 500 *8* 24 = 10000 cyls
Because 4639cyls limits. 1500 + 500*5 = 4000 <4639 cyls, 500*8 = 4000 <4639 cyls
3. Space = (CYL, (1500,500), rlse), unit = (disk, 25 ),Dsntype = large
Maximum allocable space: 1500 + 500*15 + 500*16*24 = 20100 cyls