version 20200610

version 20200610, additional help information note added to all macros in the framework
This commit is contained in:
yabwon
2020-06-10 12:27:45 +02:00
parent 8846418a50
commit 50eb73aa1f
2 changed files with 230 additions and 15 deletions

View File

@@ -36,7 +36,7 @@
*/
/**#############################################################################**/
/* Macros to generate SAS packages, version 20200609 */
/* Macros to generate SAS packages, version 20200610 */
/* A SAS package is a zip file containing a group
of SAS codes (macros, functions, datasteps generating
data, etc.) wrapped up together and %INCLUDEed by
@@ -48,14 +48,47 @@
/*** HELP START ***/
%macro generatePackage(
/* location of package files */
filesLocation=%sysfunc(pathname(work))/%lowcase(&packageName.)
filesLocation= /* location of package files
e.g. %sysfunc(pathname(work))/%lowcase(&packageName.) */
,testPackage=Y /* indicator if tests should be executed,
default value Y means "execute tests" */
,packages= /* location of other packages if there are
dependencies in loading */
)/secure;
/*** HELP END ***/
%if %superq(filesLocation) = %then
%do;
%put ;
%put ###############################################################################;
%put # This is short help information for the generatePackage macro #;
%put ###############################################################################;
%put # #;
%put # Macro to generate SAS packages, version 20200610 #;
%put # #;
%put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, datasteps generating #;
%put # data, etc.) wrapped up together and included by #;
%put # a single load.sas file (also embedded inside the zip). #;
%put # #;
%put # Parameters: #;
%put # #;
%put # filesLocation= Location of package files, example value: #;
%put # %nrstr(%%sysfunc(pathname(work))/packagename). #;
%put # Default use case: #;
%put # %nrstr(%%generatePackage(filesLocation=/path/to/packagename)) #;
%put # If empty displays this help information. #;
%put # #;
%put # testPackage= Indicator if tests should be executed. #;
%put # Default value: Y, means "execute tests" #;
%put # #;
%put # packages= Location of other packages for testing #;
%put # if there are dependencies in loading the package. #;
%put # #;
%put ###############################################################################;
%put ;
%GOTO ENDgeneratePackage;
%end;
%local zipReferrence filesWithCodes _DESCR_ _LIC_ _RC_ _PackageFileref_;
%let zipReferrence = _%sysfunc(datetime(), hex6.)_;
%let filesWithCodes = WORK._%sysfunc(datetime(), hex16.)_;
@@ -1116,7 +1149,7 @@ data _null_;
put ' end ; ';
%end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20200609 *"; put "***";';
put 'put "***"; put "* SAS package generated by generatePackage, version 20200610 *"; put "***";';
put 'run; ' /;
@@ -1473,6 +1506,9 @@ proc sql;
drop table &filesWithCodes.;
quit;
/* jump here after running %generatePackage() - only help is displayed */
%ENDgeneratePackage:
%mend generatePackage;