Collecting Performance Statistics

Overview of Collecting Performance Statistics

Several SAS system options provide information that can help you optimize your SAS programs. The STATS system option writes statistics to the SAS log. The FULLSTATS, MEMRPT, and STIMER system options can be specified in combination to select the statistics that are written to the SAS log.
STATS
specifies that statistics are to be written to the SAS log. NOSTATS specifies that no statistics are to be written to the SAS log, regardless of the values of STIMER, MEMRPT, and FULLSTATS. STATS and NOSTATS can be specified at any time during a SAS session. For more information, see STATS System Option: z/OS.
STIMER
specifies that the CPU time statistic is to be collected and maintained throughout the SAS session. If STATS and STIMER are in effect, then the CPU time statistic is written into the SAS log for each task. If FULLSTATS, STATS, and STIMER are in effect, the statistics listed under FULLSTATS below are written to the SAS log. STIMER must be specified at SAS invocation. For more information, see STIMER System Option: z/OS.
MEMRPT
specifies that memory usage statistics are to be written to the SAS log. If STATS and MEMRPT are in effect, then the amount of memory used by each task and the total amount of memory used for the SAS session is written into the SAS log. If FULLSTATS, STATS, and MEMRPT are in effect, then additional statistics are written into the SAS log, as specified below for FULLSTATS. MEMRPT and NOMEMRPT can be specified at any time during a SAS session. For more information, see MEMRPT System Option: z/OS.
FULLSTATS
specifies that additional statistics are to be written to the SAS log. The actual statistics added are determined by the values of STIMER and MEMRPT. If STIMER is in effect, then elapsed time is displayed. RSM hiperspace time and EXCP count are also displayed if their values are nonzero. If MEMRPT is in effect, then for each task, both task and total memory are displayed, including the amount of memory used for data and amount of memory used for program. FULLSTATS and NOFULLSTATS can be specified at any time during a SAS session. For more information, see FULLSTATS System Option: z/OS.

Logging SMF Statistics

SMF statistics are generated by IBM's System Management Facility. If your system is configured to enter the SMF exit, and if the SAS system options SMF and SMFEXIT= are in effect, up to 20 SMF statistics can be written to the SAS log for each task.
SMF statistics are written to the SAS log only when the STATS system option is in effect.
For further information about SMF statistics, see the configuration instructions for SAS in the z/OS environment.