mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-01-16 02:50:05 +00:00
dsSQL library updated and simplified
dsSQL library updated and simplified
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
/*** HELP START ***/
|
/*** HELP START ***/
|
||||||
|
|
||||||
/* >>> dsSQL library: <<<
|
/* >>> dsSQL library: <<<
|
||||||
*
|
*
|
||||||
* The dsSQL library stores temporary views
|
* The dsSQL library stores temporary views
|
||||||
* generated during %SQL() macro's execution.
|
* generated during %SQL() macro's execution.
|
||||||
* If possible, created as a subdirectory of WORK:
|
* If possible, created as a subdirectory of WORK:
|
||||||
|
|
||||||
options dlCreateDir;
|
|
||||||
LIBNAME dsSQL BASE "%sysfunc(pathname(WORK))/dsSQLtmp";
|
LIBNAME dsSQL BASE "%sysfunc(pathname(WORK))/dsSQLtmp";
|
||||||
|
|
||||||
* if not then redirected to WORK
|
* if not then redirected to WORK
|
||||||
@@ -17,23 +16,13 @@
|
|||||||
|
|
||||||
/*** HELP END ***/
|
/*** HELP END ***/
|
||||||
|
|
||||||
data WORK._%sysfunc(datetime(), hex16.)_;
|
|
||||||
length option $ 64;
|
|
||||||
option = getoption("dlCreateDir");
|
|
||||||
run;
|
|
||||||
|
|
||||||
options dlCreateDir;
|
|
||||||
|
|
||||||
data _null_;
|
data _null_;
|
||||||
set _LAST_;
|
length rc0 $ 32767 rc1 rc2 8;
|
||||||
rc1 = LIBNAME("dsSQL", "%sysfunc(pathname(work))/dsSQLtmp", "BASE");
|
rc0 = DCREATE("dsSQLtmp", "%sysfunc(pathname(work))/" );
|
||||||
rc2 = LIBREF("dsSQL");
|
rc1 = LIBNAME("dsSQL", "%sysfunc(pathname(work))/dsSQLtmp", "BASE");
|
||||||
|
rc2 = LIBREF ("dsSQL" );
|
||||||
if rc2 NE 0 then
|
if rc2 NE 0 then
|
||||||
rc1 = LIBNAME("dsSQL", "%sysfunc(pathname(work))", "BASE");
|
rc1 = LIBNAME("dsSQL", "%sysfunc(pathname(work))", "BASE");
|
||||||
call execute ("options " || strip(option) || ";");
|
|
||||||
run;
|
|
||||||
|
|
||||||
proc delete data = WORK._last_;
|
|
||||||
run;
|
run;
|
||||||
|
|
||||||
libname dsSQL LIST;
|
libname dsSQL LIST;
|
||||||
|
|||||||
BIN
sqlinds.zip
BIN
sqlinds.zip
Binary file not shown.
Reference in New Issue
Block a user