PRINT Procedure: z/OS

Prints the observations in a SAS data set, using all or some of the variables.

Syntax

PRINT=“options
This is a simplified version of the syntax. For the complete syntax and its explanation, see Base SAS Procedures Guide

Details

PROC PRINT formats each page separately in memory. During formatting, PROC PRINT allocates memory to hold all of the data for all of the variables that are being printed on a page. If you are using observations with large variables, such as character strings of 32,000 bytes, your available memory allocation might not be adequate. If your memory allocation is not adequate, PROC PRINT terminates due to insufficient memory.
The amount of memory that PROC PRINT requires does not depend on the number of observations that the data set contains. It is based on filling an entire page, whether that many observations exist, or whether they will all be printed. The amount of required memory is calculated by multiplying the PAGESIZE by the LENGTH of the observation.
The following tips might help address this situation:
  • Allocate a larger z/OS REGION size (and MEMSIZE) to provide more memory to PROC PRINT.
  • Specify a smaller page size. Specifying a smaller page size reduces the number of observations that PROC PRINT must hold in memory at a given time.
  • Print only the variables that you want to see instead of all of the variables for the data set. Specifying only the variables that you want to see reduces the number of variables that PROC PRINT must hold in memory for each observation.
Note: This allocation issue applies only to the LISTING output destination. HTML, RTF, PDF, and other output destinations do not have the same memory allocation issue.

See Also

PRINT Procedure in Base SAS Procedures Guide