vote up 2 vote down
star

I suspect I missing something really obvious here, but is there a way to programatically create a new catalog?

I've had a look at PROC CATALOG but can't see anything which would create a new one.

(I did try to tag this as Catalogs/PROC Catalog, but apparently these are new tags and I can't create them)

flag
added the tag for you. – Moderator Jan 16 at 3:10

2 Answers

vote up 1 vote down
check

If the CATALOG does not exists, SAS will create it.

libname temp 'c:\temp';

proc format library=temp.example;
value region
1=”NorthEast”
2=”NorthEast”
3=”Central”
4=”Central”
5=”South”
6=”South”
7=”South”
8 =”West”
9 =”West” ;
run;


proc catalog cat=temp.example;
contents;
run;
link|flag
Good point. I was hoping to create an entirely empty catalog, but I can remove a dummy entry afterward. – WilliamDobson Jan 15 at 15:04
vote up 0 vote down

I guess SCL would offer a more direct way, but here is a simple technique with

proc catalog catalog= sasuser.empty ;  
  copy in=sasuser.profile  out= sasuser.empty ;  
  select _all_ /et= none ;  
 run;  
quit;

It is very unlikely that there is an entrytype 'none'

PeterC

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.