Help using Base SAS procedures

The max amont of macro variables can be defined in a proc sql

Reply
Regular Contributor
Posts: 222

The max amont of macro variables can be defined in a proc sql

Hello everyone,


What is the max amont of macro variables can be defined in proc sql ?  and any option can change the default value?

Thanks.

If dataset One has millons of obs, could I do this?"


proc sql noprint;

select values into :value1 - :value1000000000..?

from One

;

quit;

Respected Advisor
Posts: 3,156

Re: The max amont of macro variables can be defined in a proc sql

Posted in reply to Mike_Davis

I am not aware if there is a SAS limit. I think you will most likely hit your hardware limit first.

Regards,

Haikuo

Frequent Contributor
Posts: 101

Re: The max amont of macro variables can be defined in a proc sql

I agree. Generally, the symbol tables are contained in memory, but once those limits are reached the values are written to disk, so your limits are constrained by your operating environment and not by SAS. However, just because you could doesn't mean that you should. I find that there are more efficient methods of processing data without creating several million macro variables.

Super User
Posts: 11,343

Re: The max amont of macro variables can be defined in a proc sql

Posted in reply to SAS_Bigot

The option that controls the size of your macro space is MSYMTABMAX.

I wouold seriously re-evaluate any logic as to why I was thinking I needed a billion or more macro variables.

Regular Contributor
Posts: 222

Re: The max amont of macro variables can be defined in a proc sql

Posted in reply to SAS_Bigot

Hello SAS_Bigot,

Would you like to introduce some efficient methods of processing data without creating several million macro variables?

Thank you!

Mike

Respected Advisor
Posts: 3,156

Re: The max amont of macro variables can be defined in a proc sql

Posted in reply to Mike_Davis

I am still at the loss of what do you want to achieve. If you want to get the value of, say 1000th row of variable 'values', in your original plot, you would use macro variable value1000, you could simply do something like the following:

data _null_;

n=1000;

  set one point=n;

call symputx ('value1000', values);

stop;

run;

Haikuo

Ask a Question
Discussion stats
  • 5 replies
  • 229 views
  • 6 likes
  • 4 in conversation