I was wondering what is the value of memtype to designate a template store?
Of course, I can be really specific and delete a store if no other sas file has the same name using a delete statement
or delete all the sas files but the ones named in a save statement.
But if I know the value of memtype= in proc datasets for a store, I could delete all the stores whatever their name using the kill option.
Thanks
Program 1 : creating in the proejct library a catalog, a dataset, a view and a style in a store
libname project "...";
proc format lib=project;
value $sex 'M'='Male' F='Female';
run;
data project.class;
set sashelp.class (keep=name age sex);
run;
data project.vclass / view=project.vclass;
set sashelp.class (keep=name age sex);
run;
proc template;
define style styles.pearl2 / store=project.classpink;
parent = styles.pearl;
class header / backgroundcolor = pink;
end;
run;
libname project clear;
Program 2
libname project "...";
*deleting the style in the store;
proc template ;
delete styles.pearl2 / store=project.classpink;
run;
quit;
*test 1;
proc datasets lib=project memtype=all kill;
run;
quit;
*test 2;
proc datasets lib=project nolist;
delete classpink / memtype=all;
run;
quit;
*test 3;
proc datasets lib=project nolist;
save class / memtype=data;
save vclass / memtype=view;
save formats / memtype=cat;
run;
quit;
libname project clear;
Hello @xxformat_com,
The memtype of item stores is ITEMSTOR. This includes template stores, but also other sorts of item stores (e.g., from statistical procedures).
Hello @xxformat_com,
The memtype of item stores is ITEMSTOR. This includes template stores, but also other sorts of item stores (e.g., from statistical procedures).
Hello,
The model item stores that are generated by the STORE statement in a statistical or machine learning procedure are CATALOGs.
(Not sure about template stores , but I would think they are also catalogs ... or entries in a catalog)
ods exclude all;
proc orthoreg data=AgWeight;
class Instrument;
model AgWeight = Instrument;
ods output ANOVA = OrthoregANOVA
FitStatistics = OrthoregFitStat;
STORE OUT=work.MyOrthoRegStore / LABEL='Atomic Weight of Silver by Two Different Instruments';
run;
I would deal with them using PROC CATALOG for Copying, Deleting, and Moving.
Koen
Hello @sbxkoenk,
@sbxkoenk wrote:
The model item stores that are generated by the STORE statement in a statistical or machine learning procedure are CATALOGs.
Is this true for SAS Viya? Your PROC ORTHOREG code submitted to my traditional Windows SAS 9.4M5 (with SAS/STAT 14.3) creates a file myorthoregstore.sas7bitm (not: .sas7bcat), PROC DATASETS lists it as a library member of type ITEMSTOR (not: CATALOG), trying to copy it with PROC CATALOG yields the error message "Catalog WORK.MYORTHOREGSTORE does not exist" and a second attempt after renaming the file to myorthoregstore.sas7bcat fails with "ERROR: Unable to read header information for catalog WORK.MYORTHOREGSTORE" -- indicating that the file structure is not that of a catalog.
Also, the documentation I linked to in my previous post says:
The STORE statement requests that the procedure save the context and results of the statistical analysis into an item store.
Hello @FreelanceReinh ,
You are right , I was wrong.
I am using
112 %PUT &=sysvlong; SYSVLONG=9.04.01M8P011823
and when I gave the command "dir work" this morning (after running the proc orthoreg) ... I could see my model item store listed as a catalog. It was empty though (with very small file size) and that made me suspicious.
However, I cannot reproduce that behavior right now. Probably I did sthg. wrong this morning.
When I run the code now and I enter the command "dir work", I do not see my model item store at all.
But if I go to the workspace path on my local file system, I see it there as myorthoregstore.sas7bitm.
Sorry for the confusion,
Koen
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.