On a PC (Windows), this usually means your hard drive is full. But on a Mainframe (z/OS), the logic is more subtle: the disk isn't necessarily full, but you have exceeded the space that was allocated to you.
Here's how to understand and solve this space allocation problem, based on advice from forum experts.
1. Diagnosis: Space Allocation on Mainframe
Unlike Windows where a file grows as long as there is space, the Mainframe requires that space be defined in advance (pre-allocated) via Extents.
The system works in two stages:
Primary Allocation: A large block of space reserved at the start of the job.
Secondary Allocations: Small additional blocks that the system fetches if the primary block is full (usually limited to 15 or 16 extensions).
Before asking the administration for more disk space, try to reduce the size of your data. The expert David suggests enabling binary compression. On large data with text or repetitions, this can reduce the size by 50% to 80%.
/* Compression activée pour cette table spécifique */
data WORK.A (compress=yes);
set DB2.GRANDE_TABLE;
run;
/* OU activée globalement pour toute la session */
options compress=yes;
1
/* Compression activée pour cette table spécifique */
2
DATA WORK.A (compress=yes);
3
SET DB2.GRANDE_TABLE;
4
RUN;
5
6
/* OU activée globalement pour toute la session */
7
options compress=yes;
Note: This slightly increases CPU usage, but significantly reduces I/O (Input/Output), which is often beneficial on Mainframe.
500: Size of the Primary allocation (in cylinders or tracks depending on the site configuration).
200: Size of the Secondary allocation.
The expert's calculation: David recommends a "90/10" strategy:
Estimate the final total size.
Allocate 90% of this size as Primary.
Allocate 10% as Secondary.
This avoids fragmentation and reduces the risk of late failure if the disk is physically fragmented.
4. Solution 3: The Heavy Artillery (Spanning Volumes)
Sometimes, a single physical disk (DASD volume) is not enough to hold your temporary table, even using all the available space (about 4300 cylinders on the old 3390 models).
The expert Chuck explains how to extend the WORK library across multiple physical volumes. This requires modifying the JCL to concatenate several disk allocations.
Note: This technique is reserved for advanced users who have access to detailed JCL configuration.
If you encounter the "File Full" error on Mainframe:
Compress (COMPRESS=YES): It's simple and often sufficient.
Increase the allocation (WORK='Prim Sec'): Request more cylinders in your JCL.
Check the SMS: Sometimes, the storage class (Storage Management Subsystem) automatically limits file sizes. In this case, you'll need to contact the system administrator.
Important Disclaimer
The codes and examples provided on WeAreCAS.eu are for educational purposes. It is imperative not to blindly copy-paste them into your production environments. The best approach is to understand the logic before applying it. We strongly recommend testing these scripts in a test environment (Sandbox/Dev). WeAreCAS accepts no responsibility for any impact or data loss on your systems.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.