mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-01-15 10:30:06 +00:00
loading required packages is now available
loading required packages is now available sience each package has its own unique file reference by MD5(packageName).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*** HELP START ***/
|
||||
/*** HELP START ***/
|
||||
|
||||
/**############################################################################**/
|
||||
/* */
|
||||
@@ -71,15 +71,17 @@ TODO:
|
||||
%let notes_tmp = %sysfunc(getoption(notes));
|
||||
%let source_tmp = %sysfunc(getoption(source));
|
||||
options NOnotes NOsource ls=MAX ps=MAX;
|
||||
%local _PackageFileref_;
|
||||
%let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.);
|
||||
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
/* put location of package myPackageFile.zip here */
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
;
|
||||
%if %sysfunc(fexist(package)) %then
|
||||
%if %sysfunc(fexist(&_PackageFileref_.)) %then
|
||||
%do;
|
||||
%include package(packagemetadata.sas) / &source2.;
|
||||
filename package clear;
|
||||
%include &_PackageFileref_.(packagemetadata.sas) / &source2.;
|
||||
filename &_PackageFileref_. clear;
|
||||
|
||||
/* test if required version of package is "good enough" */
|
||||
%if %sysevalf(&requiredVersion. > &packageVersion.) %then
|
||||
@@ -90,16 +92,16 @@ TODO:
|
||||
%end;
|
||||
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
ENCODING =
|
||||
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
|
||||
%else utf8 ;
|
||||
;
|
||||
%include package(load.sas) / &source2.;
|
||||
%include &_PackageFileref_.(load.sas) / &source2.;
|
||||
%end;
|
||||
%else %put ERROR:[&sysmacroname] File "&path./&packageName..zip" does not exist;
|
||||
filename package clear;
|
||||
filename &_PackageFileref_. clear;
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
%mend loadPackage;
|
||||
|
||||
@@ -123,26 +125,28 @@ TODO:
|
||||
%let notes_tmp = %sysfunc(getoption(notes));
|
||||
%let source_tmp = %sysfunc(getoption(source));
|
||||
options NOnotes NOsource ls=MAX ps=MAX;
|
||||
%local _PackageFileref_;
|
||||
%let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.);
|
||||
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
/* put location of package myPackageFile.zip here */
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
;
|
||||
%if %sysfunc(fexist(package)) %then
|
||||
%if %sysfunc(fexist(&_PackageFileref_.)) %then
|
||||
%do;
|
||||
%include package(packagemetadata.sas) / &source2.;
|
||||
filename package clear;
|
||||
%include &_PackageFileref_.(packagemetadata.sas) / &source2.;
|
||||
filename &_PackageFileref_. clear;
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
ENCODING =
|
||||
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
|
||||
%else utf8 ;
|
||||
;
|
||||
%include package(unload.sas) / &source2.;
|
||||
%include &_PackageFileref_.(unload.sas) / &source2.;
|
||||
%end;
|
||||
%else %put ERROR:[&sysmacroname] File "&path./&packageName..zip" does not exist;
|
||||
filename package clear;
|
||||
filename &_PackageFileref_. clear;
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
%mend unloadPackage;
|
||||
|
||||
@@ -170,26 +174,28 @@ TODO:
|
||||
%let notes_tmp = %sysfunc(getoption(notes));
|
||||
%let source_tmp = %sysfunc(getoption(source));
|
||||
options NOnotes NOsource ls=MAX ps=MAX;
|
||||
%local _PackageFileref_;
|
||||
%let _PackageFileref_ = P%sysfunc(MD5(%lowcase(&packageName.)),hex7.);
|
||||
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
/* put location of package myPackageFile.zip here */
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
;
|
||||
%if %sysfunc(fexist(package)) %then
|
||||
%if %sysfunc(fexist(&_PackageFileref_.)) %then
|
||||
%do;
|
||||
%include package(packagemetadata.sas) / &source2.;
|
||||
filename package clear;
|
||||
%include &_PackageFileref_.(packagemetadata.sas) / &source2.;
|
||||
filename &_PackageFileref_. clear;
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
filename package ZIP
|
||||
filename &_PackageFileref_. ZIP
|
||||
"&path./%lowcase(&packageName.).zip" %unquote(&options.)
|
||||
ENCODING =
|
||||
%if %bquote(&packageEncoding.) NE %then &packageEncoding. ;
|
||||
%else utf8 ;
|
||||
;
|
||||
%include package(help.sas) / &source2.;
|
||||
%include &_PackageFileref_.(help.sas) / &source2.;
|
||||
%end;
|
||||
%else %put ERROR:[&sysmacroname] File "&path./&packageName..zip" does not exist;
|
||||
filename package clear;
|
||||
filename &_PackageFileref_. clear;
|
||||
options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
%mend helpPackage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user