Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mm_assigndirectlib.sas File Reference

Assigns library directly using details from metadata. More...

Go to the source code of this file.

Detailed Description

Queries metadata to get the libname definition then allocates the library directly (ie, not using the META engine). usage:

%mm_assignDirectLib(MyLib);
data x; set mylib.sometable; run;

%mm_assignDirectLib(MyDB,open_passthrough=MyAlias);
create table MyTable as
  select * from connection to MyAlias( select * from DBTable);
disconnect from MyAlias;
quit;

SAS Macros

Parameters
[in]librefthe libref (not name) of the metadata library
[in]open_passthrough=() Provide an alias to produce the CONNECT TO statement for the relevant external database
[in]sql_options=() Add any options to add to proc sql statement, eg outobs= (only valid for pass through)
[in]mDebug=(0) set to 1 to show debug messages in the log
[in]mAbort=(0) set to 1 to call mp_abort().
Returns
libname statement
Version
9.2
Author
Allan Bowe

Definition in file mm_assigndirectlib.sas.