Thursday, December 8, 2011

JCL: Extent and space parameter


When a dataset is initially allocated it will normally be allocated the Primary space you requested in your JCL or IDCAMS statement. Therefore, if your JCL is SPACE=(CYL,(1000,100),RLSE) then MVS will try an allocate your Primary Space of 1000 CYLS before the PGM is loaded and runs. Primary space request can be satisfied using up to 5 extents, but if the VOLUMES or UNITS specified cannot satisfy the Primary space then you will get a JCL error. BEST PRACTICE is to allocate primary space as the maximum space required for the dataset, though there are exceptions.

Secondary Space is allocated when a program uses up all the Primary space. Rather than abend, a new extent will be allocated on the same volume and the job will continue. If the Primary is allocated in one extent, then you can have up to 15 secondary extents on one volume. If the Primary is allocated in 5 extents then you can only have 11 secondary extents on one volume.

For VSAM you can have up to 123 extents total; all on one volume or spread across many volumes. The extent count includes Primary and Secondary allocation for AIX.

If all 16 extents are allocated on a volume, or there is no space left for all 16 extents to be allocated, then the job will normally abend. This can be avoided in a number of ways, but the most common is to code UNIT=(,5), or UNIT=(3390,5), or UNIT=(SYSDA,5) – you get the point. This will allow secondary extents to be allocated on up to five more volumes before an abend occurs. The five can be any value up to a maximum of 59.

Many sites have implemented DFSMS Space Constraint Relief, or software such as ACC/SRS (DTS) or RESOLVE/SRM (BMC). This software will intercept possible space abends and take action to keep the job running. This includes adding a volume, reducing Primary space, reducing and increasing secondary space, and many others. This is rules driven and site specific, so you will need to contact your Storage Admin for more details.

Extended Format Datasets operate similar to VSAM, except you can have 255 total extents. As PAV allows more and more large volume support (27GB volumes, rather than 2.8GB) you should switch to Extended Format datasets to avoid the limitations of legacy format, and therefore take full advantage of these large volumes.

And finally FRAGMENTED DATASETS DO NOT MAKE PERFORMANCE PROBLEMS. DO NOT REORG, REALLOCATE OR DEFRAG JUST BECAUSE A DATASET IS IN MANY EXTENTS. This problem was mitigated by cache controllers, and disappeared completely when disk arrays arrived.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.