Help using Base SAS procedures

Reg:TO find the Size (Memory) of The New Table

Regular Contributor
Posts: 229

Reg:TO find the Size (Memory) of The New Table

Hi i am having two tables and i should join them by using proc sql and the joining columns are unique and the size of each dataset is 18-20 gb can u let me know is there any chance to fine the size of the new dataset ,Prior to join as there was less space i my memory
New Contributor
Posts: 3

Re: Reg:TO find the Size (Memory) of The New Table

Cant say forsure on the size issue, but if you are running into space issues, make sure you are at least using some form of compression:

options compress=binary;
Super Contributor
Super Contributor
Posts: 3,176

Re: Reg:TO find the Size (Memory) of The New Table

Posted in reply to SteveFrensch
Suggest starting with PROC CONTENTS output - also, refer to details in your particular OS environment's SAS "companion" documentation.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic / post:

proc contents estimate file size
Trusted Advisor
Posts: 2,124

Re: Reg:TO find the Size (Memory) of The New Table

You can roughly compute the resulting data set size with the

("length of record 1" + "length of record 2") * (NObs1 + Nobs2 - NMatchingObs)

You could get closer with two test runs. One with all the row and limit to the joining columns (to find the total number of observations) and one with just a few rows from each table (to find the length of one row).

However, if you are having space difficulties, you also need to look at the amount of work space that SQL will use. For that, you need the SAS companion for the OS and the SAS manual for SQL. If you are on a mainframe, SQL may use an external sort procedure depending on what your local admins set up.

Personally, I find the OS compression to be superior to SAS compression if that is available to you.

Doc Muhlbaier
Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation