|Overview of Managing Memory|
When the amount of available memory is not sufficient, increase the REGION size. If you want to limit SAS from using the entire REGION, use the MEMLEAVE option. SAS automatically sets the value of the MEMSIZE option to the amount of available storage in the REGION less the value of MEMLEAVE. MEMSIZE is the amount of memory available to SAS.
The following sections provide details about available memory management techniques.
|Specify a Value for MEMLEAVE= When You Invoke SAS|
MEMLEAVE= specifies a value that is subtracted from the total amount of memory available in the user's REGION. The amount of memory specified by MEMLEAVE= is reserved for the use of the operating environment. The remainder of the user's REGION remains available to SAS. MEMLEAVE= applies equally well to all SAS sessions, regardless of the size of the REGION.
The default value of MEMLEAVE= is 512K. You might need to increase this value depending on memory demands expected for host programs that are running in the same REGION, to prevent SAS from using too much of that REGION. For example, you might want to increase the value of MEMLEAVE= if you plan to run a memory-intensive host sort routine while also running a large SAS session.
|Consider Using Superblocking Options to Control Memory Fragmentation|
Superblocking options are SAS system options that set aside large blocks of memory for different classes of use. In most cases, the default values for these options are appropriate and should not be altered. However, if you receive a superblock-overflow warning message in the SAS log, you might want to use these options to adjust the memory allocation for your job.
For complete information about superblocking system options, see the installation instructions for SAS software in the z/OS environment. You can also submit the following SAS statement to list the superblocking system options:
|Use SYSLEAVE= and PROCLEAVE= to Handle Out-of-Memory Conditions|
Sometimes a job runs out of memory in spite of additional memory allocations. To ensure that the job ends "gracefully" under that condition, you might want to increase the values of the SAS system options SYSLEAVE= and PROCLEAVE=.
The SYSLEAVE= option reserves a specified amount of memory to ensure that, when a SAS task ends, enough memory is available to close data sets and to "clean up" other resources. For details, including the SAS default value, see SYSLEAVE= System Option: z/OS.
The PROCLEAVE= option serves a similar function for SAS procedures. For example, some procedures are designed to use memory until no more is available; they then continue by opening and using work files. PROCLEAVE= ensures that there is enough memory left to open these work files and to allocate I/O buffers for them so that the procedure can continue. For details, including the SAS default value, see PROCLEAVE= System Option: z/OS.
|Specify a Larger Region Size|
If you submit large jobs, such as a JAVA GRAPH job, to one of the following z/OS servers in the SAS Intelligence Platform, then you might not have enough space allocated for the task:
standard (nonpooled) workspace server
server-side pooled workspace server
stored process server
MAXASSIZE is a parameter of the IBM ALTUSER command that sets a maximum region size for an address space. ASSIZEMAX is a parameter of the IBM ADDUSER and ALTUSER commands that specifies a maximum region size for a specific user. ASSIZEMAX can be used to override the value specified by MAXASSIZE.
|Memory Cheat Sheet for z/OS|
Use the following questions to diagnose memory problems with SAS:
What is the error message in the SAS log or JES messages log?
How much available memory is reported at the beginning of the SAS log?
Does your site have any known restrictions on the amount of memory that is available to a particular job, for example, for an IEFUSI exit?
Did you specify the size of the memory region anywhere? If so, what value was specified? How and where was the value specified?