BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
xxformat_com
Barite | Level 11

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;
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

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).

View solution in original post

5 REPLIES 5
FreelanceReinh
Jade | Level 19

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).

sbxkoenk
SAS Super FREQ

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

FreelanceReinh
Jade | Level 19

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.

sbxkoenk
SAS Super FREQ

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

xxformat_com
Barite | Level 11
Thank you Rheinhard

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 889 views
  • 1 like
  • 3 in conversation