Dear SAS community,
I would like to know how to use MAXTABLEMEM in a code in SAS Studio in SAS Viya, I was trying like that :
cas mySession sessopts=( caslib=casuser timeout=1800 locale="en_US" MAXTABLemem=8G);
But it gives error:
ERROR: The syntax for CASSESSOPTS requires specification of one or more name=value combinations. The entire set of combinations
must be within parenthesis.
Pls advise.
Karolina
Okay, in that case you can use below code snippet to check the options in a session:
cas cas1 sessopts=(maxtablemem="16M");
proc cas;
session cas1;
sessionProp.listSessOpts result=r;
run;
print r.SessOpts[, {"Name", "Type", "Value"}];
run;
quit;
cas cas2 sessopts=(maxtablemem="32M");
proc cas;
session cas2;
sessionProp.listSessOpts result=r;
run;
print r.SessOpts[, {"Name", "Type", "Value"}];
run;
quit;
You should see that the output varies for sessions with different values of the maxtablemem option.
Hi Karolina,
I believe you need to put the 8G in plings like below:
cas mySession sessopts=( caslib=casuser timeout=1800 locale="en_US" MAXTABLemem="8G");
Mike
Thank you, then cas accepts it. However when running this code below for different MAXTABLemem, I do not have a different number of blocks. Therefore I do not know if cas is really changing the size of the blocks. Pls advise.
It can be any table you have loaded to memery, important part of code is as below, it gives info about the memory blocks.
table.tableInfo / table="iris";
table.tableDetails / table="iris"
------------------------------------------------------------------
proc cas;
session casauto;
/* Load source data (IRIS) into a table. */
table.loadTable /
path="iris.sashdat"
casout={name="iris"};
run;
table.tableInfo / table="iris";
table.tableDetails / table="iris";
quit;
I am a bit unsure what it is you want to accomplish.
Do you want to distribute the dataset across worker nodes differently? load the dataset to a single worker node? something else?
Here is a link to an article that describes the maxtablemem in more details:
Dr. StrangeRAM or: How I learned to stop worrying and love CAS - SAS Users
Mike
Okay, in that case you can use below code snippet to check the options in a session:
cas cas1 sessopts=(maxtablemem="16M");
proc cas;
session cas1;
sessionProp.listSessOpts result=r;
run;
print r.SessOpts[, {"Name", "Type", "Value"}];
run;
quit;
cas cas2 sessopts=(maxtablemem="32M");
proc cas;
session cas2;
sessionProp.listSessOpts result=r;
run;
print r.SessOpts[, {"Name", "Type", "Value"}];
run;
quit;
You should see that the output varies for sessions with different values of the maxtablemem option.
Perfect. Glad I help!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.