BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

Hi,

This question is related to

I searched the docs but couldn't find an example of a URI searching on multiple criteria.  For example, I want to return all Oracle libraries that are pre-assigned.

Using DMS, I ran the metabrowse and metafind commands.  For metafind, I could enter SASLibrary?@engine='Oracle' and SASLibrary?@IsPreassigned='1', but couldn't work out how to combine the two.

Before Paul beats me to it, I'm sure the best solution is to license Metacoda's plugins ;-).  In lieu of that, the syntax to combine criteria in a metafind URI, and esp. a link to the doc that I've somehow missed, would be greatly appreciated.

Regards,

Scott


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
3 REPLIES 3
AndrewHowell
Moderator

Hi Scott - try this.

It should show all currently assigned Oracle libraries:

proc sql;

  select * from dictionary.libnames where find(engine,"ORACLE","I")

  union

  select * from dictionary.libnames where find(sysdesc,"ORACLE","I");

quit;

ScottBass
Rhodochrosite | Level 12

Hi Andrew,

I meant the attributes based on the metadata. The use case is Oracle is down (so the libraries aren't allocated), and I want to turn off Pre Assigned in the SMC.

Or I just want to search the metadata for whatever reason, say for some custom attributes.


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
PaulHomes
Rhodochrosite | Level 12

Hi Scott,

Try the XMLSELECT filter expression:

SASLibrary[ @Engine = 'ORACLE' and @IsPreassigned = '1' ]

If you have access to SAS Management Console you can also use our free Metacoda Metadata Explorer Plug-in. I wrote a blog post "Metacoda's Metadata Explorer Plug-in" about it a while back which includes a few example XMLSELECT filter expressions, and also a link to the SAS documentation that has more examples.

Cheers

Paul

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1093 views
  • 0 likes
  • 3 in conversation