mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2026-07-23 23:05:28 +00:00
SAS Packages Framework, version 20260710
SAS Packages Framework, version `20260710` Changes: - Code cleanup
This commit is contained in:
+135
-135
@@ -32,8 +32,8 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
/**#############################################################################**/
|
||||
*/
|
||||
/**############################################################################**/
|
||||
|
||||
/*** HELP START ***/
|
||||
/* SPF (SAS Packages Framework) is a set of macros:
|
||||
@@ -43,7 +43,7 @@
|
||||
- to unload, or
|
||||
- to generate SAS packages.
|
||||
|
||||
SAS Packages Framework, version 20260617.
|
||||
SAS Packages Framework, version 20260710.
|
||||
See examples below.
|
||||
|
||||
A SAS package is a zip file containing a group of files
|
||||
@@ -101,7 +101,7 @@ Contributors:
|
||||
, force=0 /* force loading even if given version is already loaded */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load SAS package, version 20260617. Run %loadPackage(HELP) for help info.'
|
||||
des = 'Macro to load SAS package, version 20260710. Run %loadPackage(HELP) for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -117,7 +117,7 @@ minoperator
|
||||
%put ### This is short help information for the `loadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *load* SAS packages, version `20260617` #;
|
||||
%put # Macro to *load* SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -384,7 +384,7 @@ minoperator
|
||||
%else
|
||||
%do;
|
||||
%put NOTE- %str( );
|
||||
%put NOTE: It looks like the &packageName.(&pLV0.) package already loaded! Nothing to do.;
|
||||
%put NOTE: It looks like the &packageName.(&pLV0.) package is already loaded! Nothing to do.;
|
||||
%put NOTE- To force reloading use the force=1;
|
||||
/* if package is already loaded with req version. */
|
||||
%put NOTE- %str( );
|
||||
@@ -432,7 +432,7 @@ minoperator
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to unload SAS package, version 20260617. Run %unloadPackage(HELP) for help info.'
|
||||
des = 'Macro to unload SAS package, version 20260710. Run %unloadPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -447,7 +447,7 @@ des = 'Macro to unload SAS package, version 20260617. Run %unloadPackage(HELP) f
|
||||
%put ### This is short help information for the `unloadPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to unload SAS packages, version `20260617` #;
|
||||
%put # Macro to unload SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -605,7 +605,7 @@ des = 'Macro to unload SAS package, version 20260617. Run %unloadPackage(HELP) f
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to get help about SAS package, version 20260617. Run %helpPackage(HELP) for help info.'
|
||||
des = 'Macro to get help about SAS package, version 20260710. Run %helpPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -620,7 +620,7 @@ des = 'Macro to get help about SAS package, version 20260617. Run %helpPackage(H
|
||||
%put ### This is short help information for the `helpPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get help about SAS packages, version `20260617` #;
|
||||
%put # Macro to get help about SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -765,7 +765,7 @@ TODO:
|
||||
*/
|
||||
|
||||
/*+installPackage+*/
|
||||
/* Macros to install SAS packages, version 20260617 */
|
||||
/* Macros to install SAS packages, version 20260710 */
|
||||
/* A SAS package is a zip file containing a group of files
|
||||
with SAS code (macros, functions, data steps generating
|
||||
data, etc.) wrapped up together and %INCLUDEed by
|
||||
@@ -790,13 +790,13 @@ TODO:
|
||||
, SFRCVN = /* name of a macro variable to store success-failure return code value */
|
||||
, github = /* name of a user or an organization in GitHub, all characters except [A-z0-9_.-] are compressed */
|
||||
, githubRepo = /* repo name to be used, by default it is the package name, but can be altered */
|
||||
, githubToken = /* user's github fine-grained personal access token */
|
||||
, githubToken = /* user github fine-grained personal access token */
|
||||
, githubTokenDebug = 0 /* debug values: 0,1,2,3 */
|
||||
)
|
||||
/secure
|
||||
minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to install SAS package, version 20260617. Run %installPackage(HELP) for help info.'
|
||||
des = 'Macro to install SAS package, version 20260710. Run %installPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
%do;
|
||||
@@ -811,7 +811,7 @@ des = 'Macro to install SAS package, version 20260617. Run %installPackage(HELP)
|
||||
%put ### This is short help information for the `installPackage` macro #;
|
||||
%put #--------------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to install SAS packages, version `20260617` #;
|
||||
%put # Macro to install SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -914,7 +914,7 @@ des = 'Macro to install SAS package, version 20260617. Run %installPackage(HELP)
|
||||
%put # managing-your-personal-access-tokens #;
|
||||
%put # #creating-a-fine-grained-personal-access-token` #;
|
||||
%put # (lines break added for easier reading) #;
|
||||
%put # Public repos do not need authentication. #;
|
||||
%put # Public repositories do not need authentication. #;
|
||||
%put # [NOTE!] This feature is experimental in this release. #;
|
||||
%put # #;
|
||||
%put #--------------------------------------------------------------------------------------------#;
|
||||
@@ -1691,7 +1691,7 @@ des = 'Macro to install SAS package, version 20260617. Run %installPackage(HELP)
|
||||
|
||||
Macro to list SAS packages in packages folder.
|
||||
|
||||
Version 20260617
|
||||
Version 20260710
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -1713,7 +1713,7 @@ des = 'Macro to install SAS package, version 20260617. Run %installPackage(HELP)
|
||||
listDataSet /* Name of a data set to save results */
|
||||
, quiet = 0 /* Indicate if results should be printed in log */
|
||||
)/secure parmbuff
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260617.'
|
||||
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260710.'
|
||||
;
|
||||
%if (%QUPCASE(&listDataSet.) = HELP) %then
|
||||
%do;
|
||||
@@ -1728,7 +1728,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
|
||||
%put ### This is short help information for the `listPackages` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to list available SAS packages, version `20260617` #;
|
||||
%put # Macro to list available SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -1957,7 +1957,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
|
||||
Macro to generate SAS packages.
|
||||
|
||||
Version 20260617
|
||||
Version 20260710
|
||||
|
||||
A SAS package is a zip file containing a group
|
||||
of SAS codes (macros, functions, data steps generating
|
||||
@@ -1985,7 +1985,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
if null (the default) the WORK is used */
|
||||
,workInTestResults=0 /* indicates if WORK directories for tests should be located
|
||||
in the same place as results */
|
||||
,testWorkPath= /* location where tests SAS sessions' work directories
|
||||
,testWorkPath= /* location where tests SAS session work directories
|
||||
should be stored, if null (the default) the main SAS
|
||||
session WORK is used. Takes precedence over workInTestResults= */
|
||||
,sasexe= /* a DIRECTORY where the SAS binary is located,
|
||||
@@ -2007,7 +2007,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.;
|
||||
when empty takes buildLocation */
|
||||
)/ secure minoperator
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to generate SAS packages, version 20260617. Run %generatePackage(HELP) for help info.'
|
||||
des = 'Macro to generate SAS packages, version 20260710. Run %generatePackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
|
||||
%do;
|
||||
@@ -2022,7 +2022,7 @@ des = 'Macro to generate SAS packages, version 20260617. Run %generatePackage(HE
|
||||
%put ### This is short help information for the `generatePackage` macro #;
|
||||
%put #------------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to generate SAS packages, version `20260617` #;
|
||||
%put # Macro to generate SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -2079,8 +2079,8 @@ des = 'Macro to generate SAS packages, version 20260617. Run %generatePackage(HE
|
||||
%put # if null (the default) then the `!SASROOT` is used. #;
|
||||
%put # #;
|
||||
%put # - `sascfgFile=` Location of a FILE with testing session configuration #;
|
||||
%put # parameters, if null (the default) then no config file #;
|
||||
%put # is pointed during the SAS invocation, #;
|
||||
%put # parameters, if null (the default) then no configuration #;
|
||||
%put # file is pointed during the SAS invocation, #;
|
||||
%put # if set to `DEF` then the `!SASROOT/sasv9.cfg` is used. #;
|
||||
%put # #;
|
||||
%put # - `delTestWork=` Indicates if `WORK` directories generated by user tests #;
|
||||
@@ -2402,7 +2402,8 @@ data _null_;
|
||||
|
||||
/* test if version is a number */
|
||||
/*data _null_;*/ /* <- comment out, because it can be 1 data step, not 2 */
|
||||
v = "&packageVersion.";
|
||||
length v $ 64;
|
||||
v = symget("packageVersion");
|
||||
version = coalesce(input(scan(v,1,".","M"), ?? best32.),0)*1e8
|
||||
+ coalesce(input(scan(v,2,".","M"), ?? best32.),0)*1e4
|
||||
+ coalesce(input(scan(v,3,".","M"), ?? best32.),0)*1e0
|
||||
@@ -2410,7 +2411,7 @@ data _null_;
|
||||
if not (version > 0) then
|
||||
do;
|
||||
put 'ERROR: Package version should be a positive NUMBER.'
|
||||
/ 'ERROR- Current value is: ' "&packageVersion."
|
||||
/ 'ERROR- Current value is: ' v
|
||||
/ 'ERROR- Try something small, e.g. 0.1'
|
||||
/ 'ERROR- Aborting.';
|
||||
put;
|
||||
@@ -2904,7 +2905,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_.";
|
||||
title&_titleNumber_. "Package ZIP file location is: &buildLocation.";
|
||||
%end;
|
||||
|
||||
footnote1 "SAS Packages Framework, version 20260617";
|
||||
footnote1 "SAS Packages Framework, version 20260710";
|
||||
|
||||
proc print
|
||||
data = &filesWithCodes.(drop=base build folderRef fileRef rc folderid _abort_ fileId additionalContent)
|
||||
@@ -3085,7 +3086,7 @@ data _null_;
|
||||
/ ' %let pV = %sysevalf((%scan(&pV0.,1,.,M)+0)*1e8 '
|
||||
/ ' + (%scan(&pV0.,2,.,M)+0)*1e4 '
|
||||
/ ' + (%scan(&pV0.,3,.,M)+0)*1e0); '
|
||||
/ ' '
|
||||
|
||||
/ ' %let rV0 = %sysfunc(compress(&requiredVersion.,.,kd)); '
|
||||
/ ' %let rVsign = %sysfunc(compress(&requiredVersion.,<=>,k)); '
|
||||
/ ' %if %superq(rVsign)= %then %let rVsign=<=; '
|
||||
@@ -3098,7 +3099,7 @@ data _null_;
|
||||
/ ' %let rV = %sysevalf((%scan(&rV0.,1,.,M)+0)*1e8 '
|
||||
/ ' + (%scan(&rV0.,2,.,M)+0)*1e4 '
|
||||
/ ' + (%scan(&rV0.,3,.,M)+0)*1e0); '
|
||||
/ ' '
|
||||
|
||||
/ ' %if NOT %sysevalf(&rV. &rVsign. &pV.) %then '
|
||||
/ ' %do; '
|
||||
/ ' %put ERROR: Package &packageName. will not be loaded!; '
|
||||
@@ -3118,8 +3119,8 @@ data _null_;
|
||||
/ ' %local cherryPick; %let cherryPick=*; '
|
||||
/ ' %local tempLoad_minoperator; '
|
||||
/ ' %let tempLoad_minoperator = %sysfunc(getoption(minoperator)); '
|
||||
/ " "
|
||||
/ ' %if %superq(suppressExec) NE 1 %then %let suppressExec = 0; '
|
||||
|
||||
/ ' %if %sysevalf(%superq(suppressExec) NE 1,boolean) %then %let suppressExec = 0; '
|
||||
/ ' %include &_PackageFileref_.(load.sas) / &source2.; '
|
||||
/ ' options &tempLoad_minoperator.; '
|
||||
/ ' filename &_PackageFileref_. clear; '
|
||||
@@ -3177,72 +3178,71 @@ data _null_;
|
||||
or (%superq(packageReqPackages) ne )
|
||||
%then
|
||||
%do;
|
||||
put ' data _null_; '
|
||||
/ ' call symputX("packageRequiredErrors", 0, "L"); '
|
||||
/ ' run; ';
|
||||
put ' data _null_; '
|
||||
/ ' call symputX("packageRequiredErrors", 0, "L"); '
|
||||
/ ' run; ';
|
||||
%end;
|
||||
|
||||
%if %superq(packageRequired) ne %then
|
||||
%if %sysevalf(%superq(packageRequired) ne,boolean) %then
|
||||
%do;
|
||||
put ' %put NOTE- *Testing required SAS components*%sysfunc(DoSubL(' /* <- DoSubL() is here */
|
||||
/ ' options nonotes nosource %str(;) '
|
||||
/ ' options ls=max ps=max locale=en_US %str(;) '
|
||||
/ ' /* temporary redirect log */ '
|
||||
/ ' filename _stinit_ TEMP %str(;) '
|
||||
/ ' proc printto log = _stinit_ %str(;) run %str(;) '
|
||||
/ ' /* print out setinit */ '
|
||||
/ ' proc setinit %str(;) run %str(;) '
|
||||
/ ' proc printto %str(;) run %str(;) '
|
||||
/ ' options ps=min %str(;) '
|
||||
/ ' data _null_ %str(;) '
|
||||
/ ' /* loadup checklist of required SAS components */ '
|
||||
/ ' if _n_ = 1 then '
|
||||
/ ' do %str(;) '
|
||||
/ ' length req $ 256 %str(;) '
|
||||
/ ' declare hash R() %str(;) '
|
||||
/ ' _N_ = R.defineKey("req") %str(;) '
|
||||
/ ' _N_ = R.defineDone() %str(;) '
|
||||
/ ' declare hiter iR("R") %str(;) ';
|
||||
put ' %put NOTE- *Testing required SAS components*%sysfunc(DoSubL(%str(' /* <- DoSubL() is here */
|
||||
/ ' options nonotes nosource ; '
|
||||
/ ' options ls=max ps=max locale=en_US ; '
|
||||
/ ' /* temporary redirect log */ '
|
||||
/ ' filename _stinit_ TEMP ; '
|
||||
/ ' proc printto log = _stinit_ ; run ; '
|
||||
/ ' /* print out setinit */ '
|
||||
/ ' proc setinit ; run ; '
|
||||
/ ' proc printto ; run ; '
|
||||
/ ' options ps=min ; '
|
||||
/ ' data _null_ ; '
|
||||
/ ' /* loadup checklist of required SAS components */ '
|
||||
/ ' if _n_ = 1 then '
|
||||
/ ' do ; '
|
||||
/ ' length req $ 256 ; '
|
||||
/ ' declare hash R() ; '
|
||||
/ ' _N_ = R.defineKey("req") ; '
|
||||
/ ' _N_ = R.defineDone() ; '
|
||||
/ ' declare hiter iR("R") ; ';
|
||||
length packageRequired $ 32767;
|
||||
packageRequired = upcase(symget('packageRequired'));
|
||||
put ' do req = %bquote(' / packageRequired / ') %str(;) '
|
||||
/ ' _N_ = R.add(key:req,data:req) %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' '
|
||||
/ ' /* read in output from proc setinit */ '
|
||||
/ ' infile _stinit_ end=eof %str(;) '
|
||||
/ ' input %str(;) '
|
||||
/* / ' put "*> " _infile_ %str(;) ' */ /* for testing */
|
||||
/ ' '
|
||||
put ' do req = %bquote(' / packageRequired / ') ; '
|
||||
/ ' _N_ = R.add(key:req,data:req) ; '
|
||||
/ ' end ; '
|
||||
/ ' end ; '
|
||||
/ ' '
|
||||
/ ' /* read in output from proc setinit */ '
|
||||
/ ' infile _stinit_ end=eof ; '
|
||||
/ ' input ; '
|
||||
/* / ' put "*> " _infile_ ; ' */ /* for testing */
|
||||
/ ' '
|
||||
/ ' /* if component is in setinit remove it from checklist */ '
|
||||
/ ' if _infile_ =: "---" then '
|
||||
/ ' do %str(;) '
|
||||
/ ' req = upcase(substr(_infile_, 4, 64)) %str(;) '
|
||||
/ ' if R.find(key:req) = 0 then '
|
||||
/ ' do %str(;) '
|
||||
/ ' _N_ = R.remove() %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' '
|
||||
/ ' /* if checklist is not null rise error */ '
|
||||
/ ' if eof and R.num_items > 0 then '
|
||||
/ ' do %str(;) '
|
||||
/ ' put "WARNING- ###########################################" %str(;) '
|
||||
/ ' put "WARNING: The following SAS components are missing! " %str(;) '
|
||||
/ ' call symputX("packageRequiredErrors", 0, "L") %str(;) '
|
||||
/ ' do while(iR.next() = 0) %str(;) '
|
||||
/ ' put "WARNING- " req %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' put "WARNING: The package may NOT WORK as expected " %str(;) '
|
||||
/ ' put "WARNING: or even result with ERRORS! " %str(;) '
|
||||
/ ' put "WARNING- ###########################################" %str(;) '
|
||||
/ ' put %str(;) '
|
||||
/ ' end %str(;) '
|
||||
/ ' run %str(;) '
|
||||
/ ' filename _stinit_ clear %str(;) '
|
||||
/ ' options notes source %str(;) '
|
||||
/ ' ))*; ';
|
||||
/ ' if _infile_ =: "---" then '
|
||||
/ ' do ; '
|
||||
/ ' req = upcase(substr(_infile_, 4, 64)) ; '
|
||||
/ ' if R.find(key:req) = 0 then '
|
||||
/ ' do ; '
|
||||
/ ' _N_ = R.remove() ; '
|
||||
/ ' end ; '
|
||||
/ ' end ; '
|
||||
/ ' '
|
||||
/ ' /* if checklist is not null rise error */ '
|
||||
/ ' if eof and R.num_items > 0 then '
|
||||
/ ' do ; '
|
||||
/ ' put "WARNING- ###########################################" ; '
|
||||
/ ' put "WARNING: The following SAS components are missing! " ; '
|
||||
/ ' call symputX("packageRequiredErrors", 0, "L") ; '
|
||||
/ ' do while(iR.next() = 0) ; '
|
||||
/ ' put "WARNING- " req ; '
|
||||
/ ' end ; '
|
||||
/ ' put "WARNING: The package may NOT WORK as expected " ; '
|
||||
/ ' put "WARNING: or even result with ERRORS! " ; '
|
||||
/ ' put "WARNING- ###########################################" ; '
|
||||
/ ' put ; '
|
||||
/ ' end ; '
|
||||
/ ' run ; '
|
||||
/ ' filename _stinit_ clear ; '
|
||||
/ ' options notes source ; '
|
||||
/ ' )))*; ';
|
||||
%end;
|
||||
|
||||
%if %superq(packageReqPackages) ne %then
|
||||
@@ -3729,7 +3729,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.;'''
|
||||
/ ' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"'
|
||||
/ ' !! '' %put with the SAS Packages Framework version 20260617.;'''
|
||||
/ ' !! '' %put with the SAS Packages Framework version 20260710.;'''
|
||||
/ ' !! '' %put ****************************************************************************;'''
|
||||
/ ' !! '' %GOTO theEndOfTheMacro;'''
|
||||
/ ' !! '' %end;''' ;
|
||||
@@ -3893,7 +3893,7 @@ data _null_;
|
||||
%end;
|
||||
put +(-1) '`.; '' !!' /
|
||||
''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !! ' /
|
||||
''' %put with the SAS Packages Framework version 20260617.; '' !! ' /
|
||||
''' %put with the SAS Packages Framework version 20260710.; '' !! ' /
|
||||
''' %put ****************************************************************************; '' !! ' /
|
||||
''' %GOTO theEndOfTheMacro; '' !! ' /
|
||||
''' %end; '' !! ' /
|
||||
@@ -4765,7 +4765,7 @@ data _null_;
|
||||
%end;
|
||||
|
||||
put 'put " " / @3 "---------------------------------------------------------------------" / " ";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260617`*";'
|
||||
/ 'put @3 "*SAS package generated by SAS Package Framework, version `20260710`*";'
|
||||
/ "put @3 '*under `&sysscp.`(`&sysscpl.`) operating system,*';"
|
||||
/ "put @3 '*using SAS release: `&sysvlong4.`.*';"
|
||||
/ 'put " " / @3 "---------------------------------------------------------------------";';
|
||||
@@ -5204,7 +5204,7 @@ options &qlenmax_fstimer_tmp.;
|
||||
|
||||
/*+SPFint_gnPckg_tests+*/
|
||||
%macro SPFint_gnPckg_tests()/secure minoperator
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260617.';
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260710.';
|
||||
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
|
||||
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
|
||||
%do;
|
||||
@@ -5886,7 +5886,7 @@ options "elenmax_tmp.;
|
||||
|
||||
/*+SPFint_gnPckg_markdown+*/
|
||||
%macro SPFint_gnPckg_markdown()/secure minoperator
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260617.';
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260710.';
|
||||
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
|
||||
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
|
||||
%do;
|
||||
@@ -5998,7 +5998,7 @@ data &filesWithCodes.markdown;
|
||||
%end;
|
||||
|
||||
put " " / "---------------------------------------------------------------------" / " "
|
||||
/ "*SAS package generated by SAS Package Framework, version `20260617`,*"
|
||||
/ "*SAS package generated by SAS Package Framework, version `20260710`,*"
|
||||
/ "*under `&sysscp.`(`&sysscpl.`) operating system,*"
|
||||
/ "*using SAS release: `&sysvlong4.`.*"
|
||||
/ " " / "---------------------------------------------------------------------" / " ";
|
||||
@@ -6139,7 +6139,7 @@ options &MarkDownOptionsTmp.;
|
||||
|
||||
/*+SPFint_gnPckg_arch+*/
|
||||
%macro SPFint_gnPckg_arch()/secure minoperator
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260617.';
|
||||
des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260710.';
|
||||
/* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */
|
||||
%if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then
|
||||
%do;
|
||||
@@ -6306,7 +6306,7 @@ TODO: (in Polish)
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20260617. Run %loadPackages(HELP) for help info.'
|
||||
des = 'Macro to load multiple SAS packages at one run, version 20260710. Run %loadPackages(HELP) for help info.'
|
||||
parmbuff
|
||||
;
|
||||
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
|
||||
@@ -6322,7 +6322,7 @@ parmbuff
|
||||
%put ### This is short help information for the `loadPackageS` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20260617` #;
|
||||
%put # Macro wrapper for the loadPackage macro, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -6420,7 +6420,7 @@ parmbuff
|
||||
hashing_file() function, SAS 9.4M6 */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20260617. Run %verifyPackage(HELP) for help info.'
|
||||
des = 'Macro to verify SAS package with the hash digest, version 20260710. Run %verifyPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -6435,7 +6435,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260617. Run %
|
||||
%put ### This is short help information for the `verifyPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20260617` #;
|
||||
%put # Macro to verify SAS package with it hash digest, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -6569,7 +6569,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260617. Run %
|
||||
LINK CalcualteHashDigest; /* go to Link 1 */
|
||||
|
||||
if NOT emptyHash then
|
||||
do; /* step for veryfication */
|
||||
do; /* step for verification */
|
||||
if upcase(digest) = upcase(providedHash) then
|
||||
do;
|
||||
put "NOTE: Verification SUCCESSFUL."
|
||||
@@ -6588,7 +6588,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260617. Run %
|
||||
end;
|
||||
end;
|
||||
else
|
||||
do method = "SHA1", "MD5"; /* step for digest display, calcualte also SHA1 and MD5 */
|
||||
do method = "SHA1", "MD5"; /* step for digest display, calculate also SHA1 and MD5 */
|
||||
LINK CalcualteHashDigest; /* go to Link 1 */
|
||||
end;
|
||||
put 82*"-" /;
|
||||
@@ -6651,7 +6651,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260617. Run %
|
||||
*/
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to preview content of a SAS package, version 20260617. Run %previewPackage(HELP) for help info.'
|
||||
des = 'Macro to preview content of a SAS package, version 20260710. Run %previewPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
%do;
|
||||
@@ -6666,7 +6666,7 @@ des = 'Macro to preview content of a SAS package, version 20260617. Run %preview
|
||||
%put ### This is short help information for the `previewPackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to get preview of a SAS packages, version `20260617` #;
|
||||
%put # Macro to get preview of a SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -6800,7 +6800,7 @@ des = 'Macro to preview content of a SAS package, version 20260617. Run %preview
|
||||
when empty the "packages" value is used */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20260617. Run %extendPackagesFileref(HELP) for help info.'
|
||||
des = 'Macro to list directories pointed by "packages" fileref, version 20260710. Run %extendPackagesFileref(HELP) for help info.'
|
||||
;
|
||||
|
||||
%if %QUPCASE(&packages.) = HELP %then
|
||||
@@ -6816,7 +6816,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20260617
|
||||
%put ### This is short help information for the `extendPackagesFileref` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20260617` #;
|
||||
%put # Macro to list directories pointed by 'packages' fileref, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -6918,7 +6918,7 @@ filename packages list;
|
||||
is provided in required version */
|
||||
)/secure
|
||||
/*** HELP END ***/
|
||||
des = 'Macro to load additional content for a SAS package, version 20260617. Run %loadPackageAddCnt(HELP) for help info.'
|
||||
des = 'Macro to load additional content for a SAS package, version 20260710. Run %loadPackageAddCnt(HELP) for help info.'
|
||||
minoperator
|
||||
;
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -6934,7 +6934,7 @@ minoperator
|
||||
%put ### This is short help information for the `loadPackageAddCnt` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *load* additional content for a SAS package, version `20260617` #;
|
||||
%put # Macro to *load* additional content for a SAS package, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -7284,7 +7284,7 @@ minoperator
|
||||
|
||||
%WrongVersionOFPackageAddCnt:
|
||||
|
||||
/* restore optionos */
|
||||
/* restore options */
|
||||
options ls = &ls_tmp. ps = &ps_tmp.
|
||||
¬es_tmp. &source_tmp.
|
||||
&stimer_tmp. &fullstimer_tmp.
|
||||
@@ -7305,7 +7305,7 @@ minoperator
|
||||
,nobs=0 /* technical parameter */
|
||||
)
|
||||
/*** HELP END ***/
|
||||
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260617. Run %splitCodeForPackage(HELP) for help info.'
|
||||
/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260710. Run %splitCodeForPackage(HELP) for help info.'
|
||||
;
|
||||
%if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then
|
||||
%do;
|
||||
@@ -7321,7 +7321,7 @@ minoperator
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Utility macro to *split* single file with SAS package code into multiple #;
|
||||
%put # files with separate snippets, version `20260617` #;
|
||||
%put # files with separate snippets, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -7697,7 +7697,7 @@ options nomprint nosymbolgen nomlogic notes source ls=MAX ps=MAX msglevel=N ;
|
||||
*/
|
||||
if firstLine[j] then
|
||||
do;
|
||||
put '/* File generated with help of SAS Packages Framework, version 20260617. */';
|
||||
put '/* File generated with help of SAS Packages Framework, version 20260710. */';
|
||||
firstLine[j]=0;
|
||||
end;
|
||||
put _infile_;
|
||||
@@ -7730,7 +7730,7 @@ options &options_tmp2.;
|
||||
,psMAX=MAX /* pageSise in case executed inside DoSubL() */
|
||||
,ods= /* a data set for results, e.g., work.relocatePackageReport */
|
||||
)
|
||||
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260617. Run %relocatePackage(HELP) for help info.'
|
||||
/ des = 'Utility macro that locally Copies or Moves Packages, version 20260710. Run %relocatePackage(HELP) for help info.'
|
||||
secure
|
||||
minoperator
|
||||
;
|
||||
@@ -7748,7 +7748,7 @@ options &options_tmp2.;
|
||||
%put ### This is short help information for the `relocatePackage` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260617` #;
|
||||
%put # Macro to *locally copy or move* (relocate) SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -8332,7 +8332,7 @@ options &options_tmp2.;
|
||||
|
||||
run;
|
||||
|
||||
/* restore optionos */
|
||||
/* restore options */
|
||||
options ls = &ls_tmp. ps = &ps_tmp.
|
||||
¬es_tmp. &source_tmp.
|
||||
&stimer_tmp. &fullstimer_tmp.
|
||||
@@ -8413,7 +8413,7 @@ filename PACKAGES ("R:\testPackages2" "R:\testPackages1");
|
||||
vERRb /* indicates if macro should be verbose and report errors */
|
||||
)
|
||||
/ minoperator PARMBUFF
|
||||
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260617.'
|
||||
des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260710.'
|
||||
;
|
||||
/*** HELP END ***/
|
||||
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
|
||||
@@ -8429,7 +8429,7 @@ des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFile
|
||||
%put ### This is short help information for the `isPackagesFilerefOK` macro #;
|
||||
%put #-----------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to check if the `packages` fileref is "correct", version `20260617` #;
|
||||
%put # Macro to check if the `packages` fileref is "correct", version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -8563,7 +8563,7 @@ SPFmacroName /* space separated list of names */
|
||||
/
|
||||
minoperator
|
||||
secure
|
||||
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260617. Run %SasPackagesFrameworkNotes(HELP) for help info.'
|
||||
des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260710. Run %SasPackagesFrameworkNotes(HELP) for help info.'
|
||||
;
|
||||
%local list N i element;
|
||||
%let list=
|
||||
@@ -8609,7 +8609,7 @@ SasPackagesFrameworkNotes
|
||||
%put ### This is short help information for the `SasPackagesFrameworkNotes` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro prints help notes for SAS Packages Framework macros, version `20260617` #;
|
||||
%put # Macro prints help notes for SAS Packages Framework macros, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -8732,7 +8732,7 @@ options mlogic symbolgen;
|
||||
,packagesRef=packages
|
||||
,ods= /* data set for report file */
|
||||
)/
|
||||
des='Macro to create a bundle of SAS packages, version 20260617. Run %bundlePackages(HELP) for help info.'
|
||||
des='Macro to create a bundle of SAS packages, version 20260710. Run %bundlePackages(HELP) for help info.'
|
||||
secure minoperator
|
||||
;
|
||||
|
||||
@@ -8749,7 +8749,7 @@ secure minoperator
|
||||
%put ### This is short help information for the `bundlePackages` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *create bundles* of SAS packages, version `20260617` #;
|
||||
%put # Macro to *create bundles* of SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -9150,7 +9150,7 @@ run;
|
||||
|
||||
|
||||
/*===================================================================================================*/
|
||||
/* restore optionos */
|
||||
/* restore options */
|
||||
options ls = &ls_tmp. ps = &ps_tmp.
|
||||
¬es_tmp. &source_tmp.
|
||||
&stimer_tmp. &fullstimer_tmp.
|
||||
@@ -9243,7 +9243,7 @@ filename p2 "R:/dontexist";
|
||||
,verify=0
|
||||
,quiet=0
|
||||
)/
|
||||
des='Macro to extract a bundle of SAS packages, version 20260617. Run %unbundlePackages(HELP) for help info.'
|
||||
des='Macro to extract a bundle of SAS packages, version 20260710. Run %unbundlePackages(HELP) for help info.'
|
||||
secure
|
||||
minoperator
|
||||
;
|
||||
@@ -9261,7 +9261,7 @@ minoperator
|
||||
%put ### This is short help information for the `unbundlePackages` macro #;
|
||||
%put #-------------------------------------------------------------------------------#;
|
||||
%put # #;
|
||||
%put # Macro to *extract* SAS packages from a bundle, version `20260617` #;
|
||||
%put # Macro to *extract* SAS packages from a bundle, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -9551,7 +9551,7 @@ else
|
||||
end;
|
||||
|
||||
|
||||
rc = Q.output(dataset: /* create propper tag */
|
||||
rc = Q.output(dataset: /* create proper tag */
|
||||
%if %superq(ods) NE %then %do; "&ods.(label='Bundle: " !! strip(bundleName) !! "')" %end;
|
||||
%else %do; "&reportFile.1" %end;
|
||||
);
|
||||
@@ -9608,7 +9608,7 @@ rc = doSubL(
|
||||
stop;
|
||||
run;
|
||||
/*===================================================================================================*/
|
||||
/* restore optionos */
|
||||
/* restore options */
|
||||
options ls = &ls_tmp. ps = &ps_tmp.
|
||||
¬es_tmp. &source_tmp.
|
||||
&stimer_tmp. &fullstimer_tmp.
|
||||
@@ -9697,7 +9697,7 @@ libname _ "R:\check5";
|
||||
%macro SPFinit_intrnl_forceV7DSname(
|
||||
mcParam /* name of a macro parameter holding user provided data set name */
|
||||
)/secure minoperator
|
||||
des='SAS Packages Framework internal macro. Executable only inside selected SPF macros. Macro generates 4GL code that forces V7 compatybility for user provided data set names. Version 20260617.';
|
||||
des='SAS Packages Framework internal macro. Executable only inside selected SPF macros. Macro generates 4GL code that forces V7 compatibility for user provided data set names. Version 20260710.';
|
||||
/* The macro can be called only inside a data step. */
|
||||
/****************************************************************************
|
||||
### Parameters:
|
||||
@@ -9734,7 +9734,7 @@ des='SAS Packages Framework internal macro. Executable only inside selected SPF
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~sas
|
||||
%macro A(ods);
|
||||
data _null_;
|
||||
%SPDinit_intrnl_forceV7DSname(ods);
|
||||
%SPFinit_intrnl_forceV7DSname(ods);
|
||||
call symputX("ods",ods,"L");
|
||||
run;
|
||||
|
||||
@@ -9807,7 +9807,7 @@ des='SAS Packages Framework internal macro. Executable only inside selected SPF
|
||||
|
||||
, github = /* name of a user or an organization in GitHub, all characters except [A-z0-9_.-] are compressed */
|
||||
, githubRepo = /* repo name to be used, by default it is the package name, but can be altered */
|
||||
, githubToken = /* user's github fine-grained personal access token */
|
||||
, githubToken = /* user github fine-grained personal access token */
|
||||
, githubTokenDebug = 0 /* debug values: 0,1,2,3 */
|
||||
|
||||
, loadPackage=1 /* should the packages be loaded after installing */
|
||||
@@ -9816,7 +9816,7 @@ des='SAS Packages Framework internal macro. Executable only inside selected SPF
|
||||
, successDS= /* technical */
|
||||
)
|
||||
/secure
|
||||
des = 'Macro to request SAS package installation and loading, version 20260617. Run %requestPackage(HELP) for help info.'
|
||||
des = 'Macro to request SAS package installation and loading, version 20260710. Run %requestPackage(HELP) for help info.'
|
||||
;
|
||||
|
||||
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
|
||||
@@ -9832,7 +9832,7 @@ des = 'Macro to request SAS package installation and loading, version 20260617.
|
||||
%put ### This is short help information for the `requestPackage` macro #;
|
||||
%put #--------------------------------------------------------------------------------------------#;;
|
||||
%put # #;
|
||||
%put # Macro to request (install and load) SAS packages, version `20260617` #;
|
||||
%put # Macro to request (install and load) SAS packages, version `20260710` #;
|
||||
%put # #;
|
||||
%put # A SAS package is a zip file containing a group #;
|
||||
%put # of SAS codes (macros, functions, data steps generating #;
|
||||
@@ -9929,7 +9929,7 @@ des = 'Macro to request SAS package installation and loading, version 20260617.
|
||||
%put # managing-your-personal-access-tokens #;
|
||||
%put # #creating-a-fine-grained-personal-access-token` #;
|
||||
%put # (lines break added for easier reading) #;
|
||||
%put # Public repos do not need authentication. #;
|
||||
%put # Public repositories do not need authentication. #;
|
||||
%put # [NOTE!] This feature is experimental in this release. #;
|
||||
%put # #;
|
||||
%put # **Loading options:** #;
|
||||
|
||||
Reference in New Issue
Block a user