BookmarkSubscribeRSS Feed
Mike_Davis
Fluorite | Level 6

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;

5 REPLIES 5
Haikuo
Onyx | Level 15

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

Regards,

Haikuo

FloydNevseta
Pyrite | Level 9

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.

ballardw
Super User

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.

Mike_Davis
Fluorite | Level 6

Hello SAS_Bigot,

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

Thank you!

Mike

Haikuo
Onyx | Level 15

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 740 views
  • 6 likes
  • 4 in conversation