The amount of save memory in use on the system is of particular concern to a system administrator because it is one of the factors that can have a big effect on system thrashing. As the percentage of memory allocated to save memory increases, the probability that the system will begin thrashing also increases.
A number of memory structures associated with a process are stored in save memory. The total save memory usage of a process varies, depending on factors such as process stack size, code segment dictionary sharing, and file and array declarations.
Since processes use varying amounts of save memory, and save memory usage impacts system performance, it is possible for an individual process to harm system performance by using excessive save memory. This might happen, for example, if the process enters an infinite loop of procedure calls, as discussed under Protecting against Stack Overflow earlier in this section. This might also happen if the process uses large numbers of arrays and files.
You can prevent a process from exceeding a planned level of save memory usage by assigning a value to the SAVEMEMORYLIMIT task attribute. If the save memory usage of the process exceeds the limit set by this attribute, the system discontinues the process and displays the message “USER SAVE MEMORY LIMIT EXCEEDED.”
If a process is discontinued with the “USER SAVE MEMORY LIMIT EXCEEDED” error, you should check to see if it was running normally or looping. If it was running normally, you can consider program design measures to reduce the save memory usage. Alternatively, you can raise the SAVEMEMORYLIMIT value and plan to run the process at a time when the system is not very busy.
The system administrator can place some limits on the SAVEMEMORYLIMIT value your processes can have. For example, the system administrator can assign a SAVEMEMORYLIMIT value to your usercode. This value becomes the maximum SAVEMEMORYLIMIT value for all processes initiated with your usercode. If you assign a different SAVEMEMORYLIMIT value to a process, the system uses the lower of your SAVEMEMORYLIMIT assignment and the usercode SAVEMEMORYLIMIT assignment.
You might also find that the system administrator has assigned a SAVEMEMORYLIMIT value to a job queue you use for your WFL jobs. If the SAVEMEMORYLIMIT is assigned as a job queue default, you can override it with a different SAVEMEMORYLIMIT assignment in the job header of your WFL job. If the SAVEMEMORYLIMIT is assigned as a job-queue limit, your WFL job is rejected from the job queue if the job header includes a higher SAVEMEMORYLIMIT assignment. For more information about job queues, refer to the discussion of WFL in Tasking from Programming Languages.

