DATA Step, Macro, Functions and more

Digit limits

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Digit limits

I want to know very basic information.. 

I know some of it, like liberef should be 1 to 8 character. 

1) max number of columns in sas data set? 

2) max number of row/observation in sas data set? 

3) coloum character limit? 

4) max number of characters in a cell? 

5) max number of code windows or log windows that we can open same time? 

6) max number of permanent libraries that we can assign? 

 

I am asking these questions coz even my sas certified trainer was also unable to answer few of them. 


Accepted Solutions
Solution
Friday
Super User
Posts: 10,483

Re: Digit limits


BHARAT_SAS wrote:

I want to know very basic information.. 

I know some of it, like liberef should be 1 to 8 character. 

1) max number of columns in sas data set? More than you should ever use, thousands, to some extent columns and rows are related to operating system file sizes and lengths of variables.

2) max number of row/observation in sas data set? Can exceed what is expressed in a 16 digit integer

3) coloum character limit? Variable length limit is 32767 characters.

4) max number of characters in a cell? None, SAS does not have "cells".

5) max number of code windows or log windows that we can open same time? 

6) max number of permanent libraries that we can assign? 

 

I am asking these questions coz even my sas certified trainer was also unable to answer few of them. 


Since there are a number of different SAS environments, Foundation or Base SAS , EG, SAS Studio stand alone or server the number of "code" windows could vary. Log as far as I've seen is limited to one but you can programatticaly direct log output to different files.

Libraries could be limited by your installation, especially in a server environment. In stand alone BASE SAS I've had as many as 40 defined libraries but you can start getting a performance degredation as SAS maintains the metadata about the SAS files in the libraries.

 

View solution in original post


All Replies
Trusted Advisor
Posts: 1,610

Re: Digit limits

[ Edited ]

I think the answer really depends on your computer hardware and not on SAS itself. I believe you can consider the answer to all of your questions to be essentially unlimited -- except #3, a column name can have up to 32 characters, and #4 there is a max number of characters you can have in a cell, but it's huge, I have never ever come close to this limit and you can look it up in SAS Help if you really want to know, but for any practical purpose, there is no limit.

Solution
Friday
Super User
Posts: 10,483

Re: Digit limits


BHARAT_SAS wrote:

I want to know very basic information.. 

I know some of it, like liberef should be 1 to 8 character. 

1) max number of columns in sas data set? More than you should ever use, thousands, to some extent columns and rows are related to operating system file sizes and lengths of variables.

2) max number of row/observation in sas data set? Can exceed what is expressed in a 16 digit integer

3) coloum character limit? Variable length limit is 32767 characters.

4) max number of characters in a cell? None, SAS does not have "cells".

5) max number of code windows or log windows that we can open same time? 

6) max number of permanent libraries that we can assign? 

 

I am asking these questions coz even my sas certified trainer was also unable to answer few of them. 


Since there are a number of different SAS environments, Foundation or Base SAS , EG, SAS Studio stand alone or server the number of "code" windows could vary. Log as far as I've seen is limited to one but you can programatticaly direct log output to different files.

Libraries could be limited by your installation, especially in a server environment. In stand alone BASE SAS I've had as many as 40 defined libraries but you can start getting a performance degredation as SAS maintains the metadata about the SAS files in the libraries.

 

Occasional Contributor
Posts: 7

Re: Digit limits

Thank you for reply. 

Variable limit =32767, that's what I was eager to know. 

Contributor
Posts: 61

Re: Digit limits

1) Depends on the O/S, I am pretty sure. I have created millions to test limits. Probably 2^32 for 32-bit O/S, 2^64 for 64 bit systems

2) See #1

3) 2^32 is a guess

 

For the others, simulate it and see the answer. Always good to do stuff like that.

 

do test; 

   x = 1;

   do i = 1 to 1000000;

        output;

   end;

run;

 

Try various combinations.

 

 

 

 

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 165 views
  • 4 likes
  • 4 in conversation