diff --git a/README.md b/README.md index d329597..d87168c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Don't forget to give the repository a **STAR** and become [stargazer](https://gi ### Current version: -**The latest version** of the **SAS Packages Framework** is **`20260216`**. +**The latest version** of the **SAS Packages Framework** is **`20260409`**. --- @@ -190,7 +190,9 @@ The SAS Packages Framework [(short) documentation](https://github.com/yabwon/SAS --- ### Updates worth mentioning: -**Update**\[December 31st, 2025\]**:** `%bundlePackages()` and `%unbundlePackages()` **macros are available. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20241231 "bundling macros"))**. +**Update**\[April 9th, 2026\]**:**Packages can be installed from private repositories. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20260409 "bundling macros"))**. + +**Update**\[December 31st, 2025\]**:** `%bundlePackages()` and `%unbundlePackages()` **macros are available. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20251231 "bundling macros"))**. **Update**\[December 28th, 2025\]**:** `buildLocation=` and `archLocation=` **parameters added to** `%generatePackage()` **macro, they allow to redirect results of the packages generation process. (see [here](https://github.com/yabwon/SAS_PACKAGES/releases/tag/20251228 "redirect results with buildLocation="))**. @@ -234,6 +236,7 @@ This is a list of locations where the SAS Packages Framework is used: - Warsaw (Poland) - Osaka (Japan) - Kyoto (Japan) + - Boston (USA) If you want to share that you are using the SPF let me know and I'll update the list. diff --git a/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf b/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf index 204d9fd..27af5bf 100644 Binary files a/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf and b/SPF/Documentation/SAS(r) packages - the way to share (a how to)- Paper 4725-2020 - extended.pdf differ diff --git a/SPF/Macros/bundlePackages.sas b/SPF/Macros/bundlePackages.sas index bf67b6f..cfda90e 100644 --- a/SPF/Macros/bundlePackages.sas +++ b/SPF/Macros/bundlePackages.sas @@ -8,7 +8,7 @@ ,packagesRef=packages ,ods= /* data set for report file */ )/ -des='Macro to create a bundle of SAS packages, version 20260216. Run %bundlePackages(HELP) for help info.' +des='Macro to create a bundle of SAS packages, version 20260409. Run %bundlePackages(HELP) for help info.' secure minoperator ; @@ -25,7 +25,7 @@ secure minoperator %put ### This is short help information for the `bundlePackages` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *create bundles* of SAS packages, version `20260216` #; + %put # Macro to *create bundles* of SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/extendpackagesfileref.sas b/SPF/Macros/extendpackagesfileref.sas index 31d6e4a..3d6c842 100644 --- a/SPF/Macros/extendpackagesfileref.sas +++ b/SPF/Macros/extendpackagesfileref.sas @@ -6,7 +6,7 @@ when empty the "packages" value is used */ )/secure /*** HELP END ***/ -des = 'Macro to list directories pointed by "packages" fileref, version 20260216. Run %extendPackagesFileref(HELP) for help info.' +des = 'Macro to list directories pointed by "packages" fileref, version 20260409. Run %extendPackagesFileref(HELP) for help info.' ; %if %QUPCASE(&packages.) = HELP %then @@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20260216 %put ### This is short help information for the `extendPackagesFileref` macro #; %put #-----------------------------------------------------------------------------------------#;; %put # #; - %put # Macro to list directories pointed by 'packages' fileref, version `20260216` #; + %put # Macro to list directories pointed by 'packages' fileref, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/generatepackage.sas b/SPF/Macros/generatepackage.sas index bfdad1a..4f4a560 100644 --- a/SPF/Macros/generatepackage.sas +++ b/SPF/Macros/generatepackage.sas @@ -3,7 +3,7 @@ Macro to generate SAS packages. - Version 20260216 + Version 20260409 A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -53,7 +53,7 @@ when empty takes buildLocation */ )/ secure minoperator /*** HELP END ***/ -des = 'Macro to generate SAS packages, version 20260216. Run %generatePackage() for help info.' +des = 'Macro to generate SAS packages, version 20260409. Run %generatePackage() for help info.' ; %if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then %do; @@ -68,7 +68,7 @@ des = 'Macro to generate SAS packages, version 20260216. Run %generatePackage() %put ### This is short help information for the `generatePackage` macro #; %put #------------------------------------------------------------------------------------#; %put # #; - %put # Macro to generate SAS packages, version `20260216` #; + %put # Macro to generate SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -950,7 +950,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_."; title&_titleNumber_. "Package ZIP file location is: &buildLocation."; %end; -footnote1 "SAS Packages Framework, version 20260216"; +footnote1 "SAS Packages Framework, version 20260409"; proc print data = &filesWithCodes.(drop=base build folderRef fileRef rc folderid _abort_ fileId additionalContent) @@ -1775,7 +1775,7 @@ data _null_; %end; put +(-1) '`.;''' / ' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' - / ' !! '' %put with the SAS Packages Framework version 20260216.;''' + / ' !! '' %put with the SAS Packages Framework version 20260409.;''' / ' !! '' %put ****************************************************************************;''' / ' !! '' %GOTO theEndOfTheMacro;''' / ' !! '' %end;''' ; @@ -1939,7 +1939,7 @@ data _null_; %end; put +(-1) '`.; '' !!' / ''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !! ' / - ''' %put with the SAS Packages Framework version 20260216.; '' !! ' / + ''' %put with the SAS Packages Framework version 20260409.; '' !! ' / ''' %put ****************************************************************************; '' !! ' / ''' %GOTO theEndOfTheMacro; '' !! ' / ''' %end; '' !! ' / @@ -2811,7 +2811,7 @@ data _null_; %end; put 'put " " / @3 "---------------------------------------------------------------------" / " ";' - / 'put @3 "*SAS package generated by SAS Package Framework, version `20260216`*";' + / 'put @3 "*SAS package generated by SAS Package Framework, version `20260409`*";' / "put @3 '*under `&sysscp.`(`&sysscpl.`) operating system,*';" / "put @3 '*using SAS release: `&sysvlong4.`.*';" / 'put " " / @3 "---------------------------------------------------------------------";'; diff --git a/SPF/Macros/helppackage.sas b/SPF/Macros/helppackage.sas index 83e507d..b663f3f 100644 --- a/SPF/Macros/helppackage.sas +++ b/SPF/Macros/helppackage.sas @@ -28,7 +28,7 @@ */ )/secure /*** HELP END ***/ -des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() for help info.' +des = 'Macro to get help about SAS package, version 20260409. Run %helpPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -43,7 +43,7 @@ des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() %put ### This is short help information for the `helpPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to get help about SAS packages, version `20260216` #; + %put # Macro to get help about SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/installpackage.sas b/SPF/Macros/installpackage.sas index 84961cd..17ee7f8 100644 --- a/SPF/Macros/installpackage.sas +++ b/SPF/Macros/installpackage.sas @@ -1,5 +1,5 @@ /*+installPackage+*/ -/* Macros to install SAS packages, version 20260216 */ +/* Macros to install SAS packages, version 20260409 */ /* 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 @@ -22,11 +22,14 @@ default is 0 - means No, 1 means Yes */ , 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 = %sysfunc(lowcase(&packageName.)) /* 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 */ +, githubTokenDebug = 0 /* debug values: 0,1,2,3 */ ) /secure minoperator /*** HELP END ***/ -des = 'Macro to install SAS package, version 20260216. Run %%installPackage() for help info.' +des = 'Macro to install SAS package, version 20260409. Run %%installPackage() for help info.' ; %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %do; @@ -41,7 +44,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %put ### This is short help information for the `installPackage` macro #; %put #--------------------------------------------------------------------------------------------#;; %put # #; - %put # Macro to install SAS packages, version `20260216` #; + %put # Macro to install SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -119,9 +122,27 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %put # #; %put # - `github=` *Optional.* A name of a user or an organization in GitHub. #; %put # Allows an easy set of the search path for packages available on GitHub: #; - %put # `https://github.com///raw/.../` #; + %put # `https://github.com///raw/.../` #; %put # All characters except `[A-z0-9_.-]` are compressed. #; %put # #; + %put # - `githubRepo=` *Optional.* A name of a repository in GitHub. #; + %put # Allows an easy set of the search path for packages available on GitHub: #; + %put # `https://github.com///raw/.../` #; + %put # By default lowercase name of installed package is used. #; + %put # #; + %put # - `githubToken=` *Optional.* A fine-grained personal access token for GitHub. #; + %put # When the value is non-missing it triggers GitHub API access to #; + %put # private repositories. Of course the token used has to be configured #; + %put # properly for the access. #; + %put # Read GitHub documentation to learn how to create and setup your token: #; + %put # `https://docs.github.com/en/authentication/ #; + %put # keeping-your-account-and-data-secure/ #; + %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 # [NOTE!] This feature is experimental in this release. #; + %put # #; %put #--------------------------------------------------------------------------------------------#; %put # #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; @@ -259,7 +280,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %do; %let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md; - /* ingnore version support for pharmaForest for now */ + /* ingnore version support for github for now */ %let github = %sysfunc(compress(%superq(github),%str(,.-),KAD)); %put INFO: GitHub location used is: %superq(github).; %let sourcePath = https://github.com/&github./; /*users content*/ @@ -340,7 +361,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/&vers./SPF/SPFinit.sas; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/&vers./SPF/SPFinit.md; %end; - %if %superq(mirror) > 1 %then + %if NOT (%superq(mirror) in (0 1 4)) %then %put %str( )Mirror %superq(mirror) does not support versioning.; /* source code file */ @@ -363,12 +384,12 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %do; %if %superq(mirror) IN (0 3 4) %then /* SASPAC or PharmaForest or an arbitrary GitHub repo */ %do; - %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/main/; + %let packageSubDir = &githubRepo./raw/main/; %if %superq(vers) ne %then %do; /*%let packageSubDir = %sysfunc(lowcase(&packageName.))/main/hist/&version./;*/ - %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/&vers./; + %let packageSubDir = &githubRepo./raw/&vers./; %end; %end; %else @@ -405,6 +426,13 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo /* copy the file byte-by-byte */ %local installationRC; %let installationRC=1; + + %if (%superq(githubToken)= ) + OR + (%upcase(&packageName.) in (SPFINIT SASPACKAGEFRAMEWORK SASPACKAGESFRAMEWORK)) + %then + %do; + /* public repo, location with URL access, or SPFinit */ data _null_; length filein fileinMD 8 out_path in_path out_pathMD in_pathMD rcTXT $ 4096 @@ -495,7 +523,140 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo put @2 "Package documentation in markdown format not available." ; /* / out_pathMD / in_pathMD;*/ end; run; - + /************************************************************************************************************/ + %end; + %else + %do; + /* when githubToken= is not null then a "private repo" case is assumed */ + /* except for SPFinit.sas that is always installed from SAS_PACKAGES public repo */ + + %put [NOTE!] This feature is experimental in this release!; + %local ref notRunHTTP; + %let notRunHTTP=1; + %if %superq(vers)= %then %let ref = main; + %else %let ref = &vers.; + + %if NOT(%superq(githubTokenDebug) in (0 1 2 3)) %then %let githubTokenDebug = 0; + + %if %sysfunc(FEXIST(&out.)) = 0 %then + %do; + %put %str( )Installing the &packageName. package; + %put %str( )in the &firstPackagesPath. directory.; + %let notRunHTTP=0; + %end; + %else + %do; + %if 1=&replace. %then + %do; + %put %str( )The following file will be replaced during; + %put %str( )installation of the &packageName. package:; + %put %str( )%sysfunc(pathname(&out.)); + %let notRunHTTP = %sysfunc(FDELETE(&out.)); + %put %sysfunc(sysmsg()); + %end; + %else + %do; + %put %str( )The following file will NOT be replaced:; + %put %str( )%sysfunc(pathname(&out.)); + %let notRunHTTP = 1; + %end; + %end; + + %if %superq(githubToken) NE %qsysfunc(compress(%superq(githubToken),%str( _),KAD)) %then + %do; + %put WARNING: The githubToken= parameter contains illegal symbols; + %put WARNING- Allowed symbols are letters A to Z and a to z, digits 0 to 9, and underscore(_); + %put WARNING- Verify your token. Installation aborted.; + %let notRunHTTP = 1; + %end; + + %if ¬RunHTTP.=0 %then + %do; + %put %str( )URL called by PROC HTTP is:; + %put %str( )"https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).zip?ref=&ref."; + %put %str( )Headers:; + %put %str( )Accept=application/vnd.github.raw+json; + %put %str( )X-GitHub-Api-Version=2026-03-10; + %put %str( )Authorization=Bearer *****************; + %put %str( ); + + + /* proc http setup based on: + https://docs.github.com/en/rest/repos/contents?apiVersion=2026-03-10#get-repository-content + */ + proc http + method="GET" + out=&out. + URL= + "https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).zip?ref=&ref." + CLEAR_CACHE + ; + headers + "Accept"="application/vnd.github.raw+json" + "X-GitHub-Api-Version"="2026-03-10" + "Authorization"="Bearer &githubToken." + ; + debug level=&githubTokenDebug.; + run; + + %if %sysfunc(FEXIST(&out.)) AND &SYS_PROCHTTP_STATUS_CODE.=200 %then + %do; + %let installationRC=0; + %put %str( )Done with return code rc=0 (zero = success); + %end; + %else + %do; + %let installationRC=1; + %put %str( )Done with return code rc=&SYS_PROCHTTP_STATUS_CODE. (zero = success); + %put %str( )Message: &SYS_PROCHTTP_STATUS_PHRASE.; + %end; + + %let notRunHTTP=1; + %if 1=&instDoc. AND 0=&installationRC. %then + %do; + %if %sysfunc(FEXIST(&outMD.)) = 0 %then + %do; + %put %str( )Package documentation installation on request:; + %let notRunHTTP = 0; + %end; + %else %if 1=&replace. %then + %do; + %put %str( )Package documentation installation on demand:; + %let notRunHTTP = %sysfunc(FDELETE(&outMD.)); + %if ¬RunHTTP. %then %put %sysfunc(sysmsg()); + %end; + + %if ¬RunHTTP.=0 %then + %do; + proc http + method="GET" + out=&outMD. + URL= + "https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).md?ref=&ref." + CLEAR_CACHE + ; + headers + "Accept"="application/vnd.github.raw+json" + "X-GitHub-Api-Version"="2026-03-10" + "Authorization"="Bearer &githubToken." + ; + debug level=&githubTokenDebug.; + run; + %if %sysfunc(FEXIST(&outMD.)) AND &SYS_PROCHTTP_STATUS_CODE.=200 + %then %put %str( )status successful!; + %else %put %str( )status unsuccessful!; + + %end; + %end; + %end; + %else + %do; + %let installationRC=1; + %put %str( )Done with return code rc=1 (zero = success); + %end; + /************************************************************************************************************/ + %end; + filename &in. clear; filename &out. clear; filename &inMD. clear; diff --git a/SPF/Macros/ispackagesfilerefok.sas b/SPF/Macros/ispackagesfilerefok.sas index 57562c7..4849c7b 100644 --- a/SPF/Macros/ispackagesfilerefok.sas +++ b/SPF/Macros/ispackagesfilerefok.sas @@ -4,7 +4,7 @@ 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 20260216.' +des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260409.' ; /*** HELP END ***/ %if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then @@ -20,7 +20,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 `20260216` #; + %put # Macro to check if the `packages` fileref is "correct", version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/listpackages.sas b/SPF/Macros/listpackages.sas index 3cb08fd..3b00f6b 100644 --- a/SPF/Macros/listpackages.sas +++ b/SPF/Macros/listpackages.sas @@ -3,7 +3,7 @@ Macro to list SAS packages in packages folder. - Version 20260216 + Version 20260409 A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -25,7 +25,7 @@ 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 20260216.' +des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260409.' ; %if (%QUPCASE(&listDataSet.) = HELP) %then %do; @@ -40,7 +40,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 `20260216` #; + %put # Macro to list available SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/loadpackage.sas b/SPF/Macros/loadpackage.sas index f663804..58bfade 100644 --- a/SPF/Macros/loadpackage.sas +++ b/SPF/Macros/loadpackage.sas @@ -36,7 +36,7 @@ */ )/secure /*** HELP END ***/ -des = 'Macro to load SAS package, version 20260216. Run %loadPackage() for help info.' +des = 'Macro to load SAS package, version 20260409. Run %loadPackage() for help info.' minoperator ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then @@ -52,7 +52,7 @@ minoperator %put ### This is short help information for the `loadPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *load* SAS packages, version `20260216` #; + %put # Macro to *load* SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/loadpackageaddcnt.sas b/SPF/Macros/loadpackageaddcnt.sas index 44988e9..9f32200 100644 --- a/SPF/Macros/loadpackageaddcnt.sas +++ b/SPF/Macros/loadpackageaddcnt.sas @@ -19,7 +19,7 @@ is provided in required version */ )/secure /*** HELP END ***/ -des = 'Macro to load additional content for a SAS package, version 20260216. Run %loadPackageAddCnt() for help info.' +des = 'Macro to load additional content for a SAS package, version 20260409. Run %loadPackageAddCnt() for help info.' minoperator ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then @@ -35,7 +35,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 `20260216` #; + %put # Macro to *load* additional content for a SAS package, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/loadpackages.sas b/SPF/Macros/loadpackages.sas index 72eedc9..639b238 100644 --- a/SPF/Macros/loadpackages.sas +++ b/SPF/Macros/loadpackages.sas @@ -11,7 +11,7 @@ */ )/secure /*** HELP END ***/ -des = 'Macro to load multiple SAS packages at one run, version 20260216. Run %loadPackages() for help info.' +des = 'Macro to load multiple SAS packages at one run, version 20260409. Run %loadPackages() for help info.' parmbuff ; %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then @@ -27,7 +27,7 @@ parmbuff %put ### This is short help information for the `loadPackageS` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro wrapper for the loadPackage macro, version `20260216` #; + %put # Macro wrapper for the loadPackage macro, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/previewpackage.sas b/SPF/Macros/previewpackage.sas index 314c96c..6073021 100644 --- a/SPF/Macros/previewpackage.sas +++ b/SPF/Macros/previewpackage.sas @@ -23,7 +23,7 @@ */ )/secure /*** HELP END ***/ -des = 'Macro to preview content of a SAS package, version 20260216. Run %previewPackage() for help info.' +des = 'Macro to preview content of a SAS package, version 20260409. Run %previewPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20260216. Run %preview %put ### This is short help information for the `previewPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to get preview of a SAS packages, version `20260216` #; + %put # Macro to get preview of a SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/relocatepackage.sas b/SPF/Macros/relocatepackage.sas index 9b4c961..3cdcde7 100644 --- a/SPF/Macros/relocatepackage.sas +++ b/SPF/Macros/relocatepackage.sas @@ -15,7 +15,7 @@ ,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 20260216. Run %relocatePackage() for help info.' +/ des = 'Utility macro that locally Copies or Moves Packages, version 20260409. Run %relocatePackage() for help info.' secure minoperator ; @@ -33,7 +33,7 @@ %put ### This is short help information for the `relocatePackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *locally copy or move* (relocate) SAS packages, version `20260216` #; + %put # Macro to *locally copy or move* (relocate) SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/saspackagesframeworknotes.sas b/SPF/Macros/saspackagesframeworknotes.sas index c02c199..f4349a3 100644 --- a/SPF/Macros/saspackagesframeworknotes.sas +++ b/SPF/Macros/saspackagesframeworknotes.sas @@ -5,7 +5,7 @@ SPFmacroName /* space separated list of names */ / minoperator secure -des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260216. Run %SasPackagesFrameworkNotes(HELP) for help info.' +des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260409. Run %SasPackagesFrameworkNotes(HELP) for help info.' ; %local list N i element; %let list= @@ -51,7 +51,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 `20260216` #; + %put # Macro prints help notes for SAS Packages Framework macros, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/spfint_gnpckg_arch.sas b/SPF/Macros/spfint_gnpckg_arch.sas index 15d8aaf..89bf18d 100644 --- a/SPF/Macros/spfint_gnpckg_arch.sas +++ b/SPF/Macros/spfint_gnpckg_arch.sas @@ -1,6 +1,6 @@ /*+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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; diff --git a/SPF/Macros/spfint_gnpckg_markdown.sas b/SPF/Macros/spfint_gnpckg_markdown.sas index 2a61b1b..43a6039 100644 --- a/SPF/Macros/spfint_gnpckg_markdown.sas +++ b/SPF/Macros/spfint_gnpckg_markdown.sas @@ -1,6 +1,6 @@ /*+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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; @@ -112,7 +112,7 @@ data &filesWithCodes.markdown; %end; put " " / "---------------------------------------------------------------------" / " " - / "*SAS package generated by SAS Package Framework, version `20260216`,*" + / "*SAS package generated by SAS Package Framework, version `20260409`,*" / "*under `&sysscp.`(`&sysscpl.`) operating system,*" / "*using SAS release: `&sysvlong4.`.*" / " " / "---------------------------------------------------------------------" / " "; diff --git a/SPF/Macros/spfint_gnpckg_tests.sas b/SPF/Macros/spfint_gnpckg_tests.sas index d6bfddf..7fa27ad 100644 --- a/SPF/Macros/spfint_gnpckg_tests.sas +++ b/SPF/Macros/spfint_gnpckg_tests.sas @@ -1,6 +1,6 @@ /*+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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; diff --git a/SPF/Macros/splitcodeforpackage.sas b/SPF/Macros/splitcodeforpackage.sas index a7d7546..dc9af2a 100644 --- a/SPF/Macros/splitcodeforpackage.sas +++ b/SPF/Macros/splitcodeforpackage.sas @@ -8,7 +8,7 @@ ,nobs=0 /* technical parameter */ ) /*** HELP END ***/ -/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260216. Run %splitCodeForPackage() for help info.' +/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260409. Run %splitCodeForPackage() for help info.' ; %if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then %do; @@ -24,7 +24,7 @@ %put #-------------------------------------------------------------------------------#; %put # #; %put # Utility macro to *split* single file with SAS package code into multiple #; - %put # files with separate snippets, version `20260216` #; + %put # files with separate snippets, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -400,7 +400,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 20260216. */'; + put '/* File generated with help of SAS Packages Framework, version 20260409. */'; firstLine[j]=0; end; put _infile_; diff --git a/SPF/Macros/unbundlePackages.sas b/SPF/Macros/unbundlePackages.sas index ed66a96..d2afade 100644 --- a/SPF/Macros/unbundlePackages.sas +++ b/SPF/Macros/unbundlePackages.sas @@ -8,7 +8,7 @@ ,ods= /* data set for report file */ ,verify=0 )/ -des='Macro to extract a bundle of SAS packages, version 20260216. Run %unbundlePackages(HELP) for help info.' +des='Macro to extract a bundle of SAS packages, version 20260409. Run %unbundlePackages(HELP) for help info.' secure minoperator ; @@ -26,7 +26,7 @@ minoperator %put ### This is short help information for the `unbundlePackages` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *extract* SAS packages from a bundle, version `20260216` #; + %put # Macro to *extract* SAS packages from a bundle, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/unloadpackage.sas b/SPF/Macros/unloadpackage.sas index ef745e1..b5d52d4 100644 --- a/SPF/Macros/unloadpackage.sas +++ b/SPF/Macros/unloadpackage.sas @@ -20,7 +20,7 @@ */ )/secure /*** HELP END ***/ -des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for help info.' +des = 'Macro to unload SAS package, version 20260409. Run %unloadPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for h %put ### This is short help information for the `unloadPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to unload SAS packages, version `20260216` #; + %put # Macro to unload SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/Macros/verifypackage.sas b/SPF/Macros/verifypackage.sas index d2c7113..438a22e 100644 --- a/SPF/Macros/verifypackage.sas +++ b/SPF/Macros/verifypackage.sas @@ -13,7 +13,7 @@ hashing_file() function, SAS 9.4M6 */ )/secure /*** HELP END ***/ -des = 'Macro to verify SAS package with the hash digest, version 20260216. Run %verifyPackage() for help info.' +des = 'Macro to verify SAS package with the hash digest, version 20260409. Run %verifyPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260216. Run % %put ### This is short help information for the `verifyPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to verify SAS package with it hash digest, version `20260216` #; + %put # Macro to verify SAS package with it hash digest, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/SPF/SPFinit.md b/SPF/SPFinit.md index ec355e9..b5915e0 100644 --- a/SPF/SPFinit.md +++ b/SPF/SPFinit.md @@ -1,7 +1,7 @@ --- -# SAS Packages Framework, version `20260216` +# SAS Packages Framework, version `20260409` --- @@ -34,7 +34,7 @@ A **SAS package** is an automatically generated, single, stand alone *zip* file The *purpose of a package* is to be a simple, and easy to access, code sharing medium, which will allow: on the one hand, to separate the code complex dependencies created by the developer from the user experience with the final product and, on the other hand, reduce developer's and user's unnecessary frustration related to a remote deployment process. -In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20260216`**. +In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20260409`**. **To get started with SAS Packages** try this [**`Introduction to SAS Packages`**](https://youtube.com/playlist?list=PLeMzGEImIT5eV13IGXQIgWmTFCJt_cLZG&si=ElQm0_ifq76mvUbq "Introduction to SAS Packages video series") video series or [**`Getting Started with SAS Packages`**](https://github.com/yabwon/SAS_PACKAGES/blob/main/SPF/Documentation/Getting_Started_with_SAS_Packages.pdf "Getting Started with SAS Packages") presentation (see the `./SPF/Documentation` directory). @@ -57,7 +57,7 @@ them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPack ## This is short help information for the `installPackage` macro -------------------------------------------------------------------------------------------- - Macro to install SAS packages, version `20260216` + Macro to install SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -137,6 +137,24 @@ them using the SPF can be found [**HERE**](https://github.com/yabwon/HoW-SASPack `https://github.com///raw/.../` All characters except `[A-z0-9_.-]` are compressed. + - `githubRepo=` *Optional.* A name of a repository in GitHub. + Allows an easy set of the search path for packages available on GitHub: + `https://github.com///raw/.../` + By default lowercase name of installed package is used. + + - `githubToken=` *Optional.* A fine-grained personal access token for GitHub. + When the value is non-missing it triggers GitHub API access to + private repositories. Of course the token used has to be configured + properly for the access. + Read GitHub documentation to learn how to create and setup your token: + `https://docs.github.com/en/authentication/` + `keeping-your-account-and-data-secure/` + `managing-your-personal-access-tokens` + `#creating-a-fine-grained-personal-access-token` + (lines break added for easier reading) + Public repos do not need authentication. + [NOTE!] This feature is experimental in this release. + -------------------------------------------------------------------------------------------- Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` to learn more. @@ -185,7 +203,7 @@ filename packages "C:/SAS_PACKAGES"; ## This is short help information for the `helpPackage` macro ------------------------------------------------------------------------------- - Macro to get help about SAS packages, version `20260216` + Macro to get help about SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -263,7 +281,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `loadPackage` macro ------------------------------------------------------------------------------- - Macro to *load* SAS packages, version `20260216` + Macro to *load* SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -421,7 +439,7 @@ If created, those macros are automatically deleted when the `%unloadPackage()` m ## This is short help information for the `loadPackageS` macro ------------------------------------------------------------------------------- - Macro wrapper for the loadPackage macro, version `20260216` + Macro wrapper for the loadPackage macro, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -472,7 +490,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `unloadPackage` macro ------------------------------------------------------------------------------- - Macro to unload SAS packages, version `20260216` + Macro to unload SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -539,7 +557,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `listPackages` macro ----------------------------------------------------------------------------------------- - Macro to list available SAS packages, version `20260216` + Macro to list available SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -588,7 +606,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `verifyPackage` macro ------------------------------------------------------------------------------- - Macro to verify SAS package with it hash digest, version `20260216` + Macro to verify SAS package with it hash digest, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -644,7 +662,7 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages; ## This is short help information for the `previewPackage` macro ------------------------------------------------------------------------------- - Macro to get preview of a SAS packages, version `20260216` + Macro to get preview of a SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -713,7 +731,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `generatePackage` macro ------------------------------------------------------------------------------- - Macro to generate SAS packages, version `20260216` + Macro to generate SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -946,7 +964,7 @@ All files have to have `.sas` extension. Other files are ignored. ## This is short help information for the `extendPackagesFileref` macro ----------------------------------------------------------------------------------------- - Macro to list directories pointed by 'packages' fileref, version `20260216` + Macro to list directories pointed by 'packages' fileref, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -988,7 +1006,7 @@ filename packages ("D:/NEW_DIR" %extendPackagesFileref()); %* add new directory; ## This is short help information for the `loadPackageAddCnt` macro ------------------------------------------------------------------------------- - Macro to load *additional content* for a SAS package, version `20260216` + Macro to load *additional content* for a SAS package, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1082,7 +1100,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ------------------------------------------------------------------------------- Utility macro to *split* single file with SAS package code into multiple - files with separate snippets, version `20260216` + files with separate snippets, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1163,7 +1181,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `relocatePackage` macro ------------------------------------------------------------------------------- - Macro to *locally copy or move* (relocate) SAS packages, version `20260216` + Macro to *locally copy or move* (relocate) SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1275,7 +1293,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `isPackagesFilerefOK` macro ----------------------------------------------------------------------------------------- - Macro to check if the `packages` fileref is "correct", version `20260216` + Macro to check if the `packages` fileref is "correct", version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1326,7 +1344,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `SasPackagesFrameworkNotes` macro ------------------------------------------------------------------------------- - Macro prints help notes for SAS Packages Framework macros, version `20260216` + Macro prints help notes for SAS Packages Framework macros, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1376,7 +1394,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `bundlePackages` macro ------------------------------------------------------------------------------- - Macro to *create bundles* of SAS packages, version `20260216` + Macro to *create bundles* of SAS packages, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1445,7 +1463,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages; ## This is short help information for the `unbundlePackages` macro ------------------------------------------------------------------------------- - Macro to *extract* SAS packages from a bundle, version `20260216` + Macro to *extract* SAS packages from a bundle, version `20260409` A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating diff --git a/SPF/SPFinit.sas b/SPF/SPFinit.sas index 7c21b97..35dce29 100644 --- a/SPF/SPFinit.sas +++ b/SPF/SPFinit.sas @@ -43,7 +43,7 @@ - to unload, or - to generate SAS packages. - Version 20260216. + Version 20260409. See examples below. A SAS package is a zip file containing a group of files @@ -101,7 +101,7 @@ Contributors: */ )/secure /*** HELP END ***/ -des = 'Macro to load SAS package, version 20260216. Run %loadPackage() for help info.' +des = 'Macro to load SAS package, version 20260409. Run %loadPackage() 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 `20260216` #; + %put # Macro to *load* SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -398,7 +398,7 @@ minoperator */ )/secure /*** HELP END ***/ -des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for help info.' +des = 'Macro to unload SAS package, version 20260409. Run %unloadPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -413,7 +413,7 @@ des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for h %put ### This is short help information for the `unloadPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to unload SAS packages, version `20260216` #; + %put # Macro to unload SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -568,7 +568,7 @@ des = 'Macro to unload SAS package, version 20260216. Run %unloadPackage() for h */ )/secure /*** HELP END ***/ -des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() for help info.' +des = 'Macro to get help about SAS package, version 20260409. Run %helpPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -583,7 +583,7 @@ des = 'Macro to get help about SAS package, version 20260216. Run %helpPackage() %put ### This is short help information for the `helpPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to get help about SAS packages, version `20260216` #; + %put # Macro to get help about SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -728,7 +728,7 @@ TODO: */ /*+installPackage+*/ -/* Macros to install SAS packages, version 20260216 */ +/* Macros to install SAS packages, version 20260409 */ /* 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 @@ -751,11 +751,14 @@ TODO: default is 0 - means No, 1 means Yes */ , 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 = %sysfunc(lowcase(&packageName.)) /* 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 */ +, githubTokenDebug = 0 /* debug values: 0,1,2,3 */ ) /secure minoperator /*** HELP END ***/ -des = 'Macro to install SAS package, version 20260216. Run %%installPackage() for help info.' +des = 'Macro to install SAS package, version 20260409. Run %%installPackage() for help info.' ; %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %do; @@ -770,7 +773,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %put ### This is short help information for the `installPackage` macro #; %put #--------------------------------------------------------------------------------------------#;; %put # #; - %put # Macro to install SAS packages, version `20260216` #; + %put # Macro to install SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -848,9 +851,27 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %put # #; %put # - `github=` *Optional.* A name of a user or an organization in GitHub. #; %put # Allows an easy set of the search path for packages available on GitHub: #; - %put # `https://github.com///raw/.../` #; + %put # `https://github.com///raw/.../` #; %put # All characters except `[A-z0-9_.-]` are compressed. #; %put # #; + %put # - `githubRepo=` *Optional.* A name of a repository in GitHub. #; + %put # Allows an easy set of the search path for packages available on GitHub: #; + %put # `https://github.com///raw/.../` #; + %put # By default lowercase name of installed package is used. #; + %put # #; + %put # - `githubToken=` *Optional.* A fine-grained personal access token for GitHub. #; + %put # When the value is non-missing it triggers GitHub API access to #; + %put # private repositories. Of course the token used has to be configured #; + %put # properly for the access. #; + %put # Read GitHub documentation to learn how to create and setup your token: #; + %put # `https://docs.github.com/en/authentication/ #; + %put # keeping-your-account-and-data-secure/ #; + %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 # [NOTE!] This feature is experimental in this release. #; + %put # #; %put #--------------------------------------------------------------------------------------------#; %put # #; %put # Visit: `https://github.com/yabwon/SAS_PACKAGES/tree/main/SPF/Documentation` #; @@ -988,7 +1009,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %do; %let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.sas; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/main/SPF/SPFinit.md; - /* ingnore version support for pharmaForest for now */ + /* ingnore version support for github for now */ %let github = %sysfunc(compress(%superq(github),%str(,.-),KAD)); %put INFO: GitHub location used is: %superq(github).; %let sourcePath = https://github.com/&github./; /*users content*/ @@ -1069,7 +1090,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %let SPFinitMirror = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/&vers./SPF/SPFinit.sas; %let SPFinitMirrorMD = https://raw.githubusercontent.com/yabwon/SAS_PACKAGES/&vers./SPF/SPFinit.md; %end; - %if %superq(mirror) > 1 %then + %if NOT (%superq(mirror) in (0 1 4)) %then %put %str( )Mirror %superq(mirror) does not support versioning.; /* source code file */ @@ -1092,12 +1113,12 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo %do; %if %superq(mirror) IN (0 3 4) %then /* SASPAC or PharmaForest or an arbitrary GitHub repo */ %do; - %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/main/; + %let packageSubDir = &githubRepo./raw/main/; %if %superq(vers) ne %then %do; /*%let packageSubDir = %sysfunc(lowcase(&packageName.))/main/hist/&version./;*/ - %let packageSubDir = %sysfunc(lowcase(&packageName.))/raw/&vers./; + %let packageSubDir = &githubRepo./raw/&vers./; %end; %end; %else @@ -1134,6 +1155,13 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo /* copy the file byte-by-byte */ %local installationRC; %let installationRC=1; + + %if (%superq(githubToken)= ) + OR + (%upcase(&packageName.) in (SPFINIT SASPACKAGEFRAMEWORK SASPACKAGESFRAMEWORK)) + %then + %do; + /* public repo, location with URL access, or SPFinit */ data _null_; length filein fileinMD 8 out_path in_path out_pathMD in_pathMD rcTXT $ 4096 @@ -1224,7 +1252,140 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo put @2 "Package documentation in markdown format not available." ; /* / out_pathMD / in_pathMD;*/ end; run; - + /************************************************************************************************************/ + %end; + %else + %do; + /* when githubToken= is not null then a "private repo" case is assumed */ + /* except for SPFinit.sas that is always installed from SAS_PACKAGES public repo */ + + %put [NOTE!] This feature is experimental in this release!; + %local ref notRunHTTP; + %let notRunHTTP=1; + %if %superq(vers)= %then %let ref = main; + %else %let ref = &vers.; + + %if NOT(%superq(githubTokenDebug) in (0 1 2 3)) %then %let githubTokenDebug = 0; + + %if %sysfunc(FEXIST(&out.)) = 0 %then + %do; + %put %str( )Installing the &packageName. package; + %put %str( )in the &firstPackagesPath. directory.; + %let notRunHTTP=0; + %end; + %else + %do; + %if 1=&replace. %then + %do; + %put %str( )The following file will be replaced during; + %put %str( )installation of the &packageName. package:; + %put %str( )%sysfunc(pathname(&out.)); + %let notRunHTTP = %sysfunc(FDELETE(&out.)); + %put %sysfunc(sysmsg()); + %end; + %else + %do; + %put %str( )The following file will NOT be replaced:; + %put %str( )%sysfunc(pathname(&out.)); + %let notRunHTTP = 1; + %end; + %end; + + %if %superq(githubToken) NE %qsysfunc(compress(%superq(githubToken),%str( _),KAD)) %then + %do; + %put WARNING: The githubToken= parameter contains illegal symbols; + %put WARNING- Allowed symbols are letters A to Z and a to z, digits 0 to 9, and underscore(_); + %put WARNING- Verify your token. Installation aborted.; + %let notRunHTTP = 1; + %end; + + %if ¬RunHTTP.=0 %then + %do; + %put %str( )URL called by PROC HTTP is:; + %put %str( )"https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).zip?ref=&ref."; + %put %str( )Headers:; + %put %str( )Accept=application/vnd.github.raw+json; + %put %str( )X-GitHub-Api-Version=2026-03-10; + %put %str( )Authorization=Bearer *****************; + %put %str( ); + + + /* proc http setup based on: + https://docs.github.com/en/rest/repos/contents?apiVersion=2026-03-10#get-repository-content + */ + proc http + method="GET" + out=&out. + URL= + "https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).zip?ref=&ref." + CLEAR_CACHE + ; + headers + "Accept"="application/vnd.github.raw+json" + "X-GitHub-Api-Version"="2026-03-10" + "Authorization"="Bearer &githubToken." + ; + debug level=&githubTokenDebug.; + run; + + %if %sysfunc(FEXIST(&out.)) AND &SYS_PROCHTTP_STATUS_CODE.=200 %then + %do; + %let installationRC=0; + %put %str( )Done with return code rc=0 (zero = success); + %end; + %else + %do; + %let installationRC=1; + %put %str( )Done with return code rc=&SYS_PROCHTTP_STATUS_CODE. (zero = success); + %put %str( )Message: &SYS_PROCHTTP_STATUS_PHRASE.; + %end; + + %let notRunHTTP=1; + %if 1=&instDoc. AND 0=&installationRC. %then + %do; + %if %sysfunc(FEXIST(&outMD.)) = 0 %then + %do; + %put %str( )Package documentation installation on request:; + %let notRunHTTP = 0; + %end; + %else %if 1=&replace. %then + %do; + %put %str( )Package documentation installation on demand:; + %let notRunHTTP = %sysfunc(FDELETE(&outMD.)); + %if ¬RunHTTP. %then %put %sysfunc(sysmsg()); + %end; + + %if ¬RunHTTP.=0 %then + %do; + proc http + method="GET" + out=&outMD. + URL= + "https://api.github.com/repos/&github./&githubRepo./contents/%sysfunc(lowcase(&packageName.)).md?ref=&ref." + CLEAR_CACHE + ; + headers + "Accept"="application/vnd.github.raw+json" + "X-GitHub-Api-Version"="2026-03-10" + "Authorization"="Bearer &githubToken." + ; + debug level=&githubTokenDebug.; + run; + %if %sysfunc(FEXIST(&outMD.)) AND &SYS_PROCHTTP_STATUS_CODE.=200 + %then %put %str( )status successful!; + %else %put %str( )status unsuccessful!; + + %end; + %end; + %end; + %else + %do; + %let installationRC=1; + %put %str( )Done with return code rc=1 (zero = success); + %end; + /************************************************************************************************************/ + %end; + filename &in. clear; filename &out. clear; filename &inMD. clear; @@ -1422,7 +1583,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo Macro to list SAS packages in packages folder. - Version 20260216 + Version 20260409 A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1444,7 +1605,7 @@ des = 'Macro to install SAS package, version 20260216. Run %%installPackage() fo 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 20260216.' +des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20260409.' ; %if (%QUPCASE(&listDataSet.) = HELP) %then %do; @@ -1459,7 +1620,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 `20260216` #; + %put # Macro to list available SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -1685,7 +1846,7 @@ options ls = &ls_tmp. ps = &ps_tmp. ¬es_tmp. &source_tmp.; Macro to generate SAS packages. - Version 20260216 + Version 20260409 A SAS package is a zip file containing a group of SAS codes (macros, functions, data steps generating @@ -1735,7 +1896,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 20260216. Run %generatePackage() for help info.' +des = 'Macro to generate SAS packages, version 20260409. Run %generatePackage() for help info.' ; %if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then %do; @@ -1750,7 +1911,7 @@ des = 'Macro to generate SAS packages, version 20260216. Run %generatePackage() %put ### This is short help information for the `generatePackage` macro #; %put #------------------------------------------------------------------------------------#; %put # #; - %put # Macro to generate SAS packages, version `20260216` #; + %put # Macro to generate SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -2632,7 +2793,7 @@ title6 "MD5 hashed fileref of package lowcase name: &_PackageFileref_."; title&_titleNumber_. "Package ZIP file location is: &buildLocation."; %end; -footnote1 "SAS Packages Framework, version 20260216"; +footnote1 "SAS Packages Framework, version 20260409"; proc print data = &filesWithCodes.(drop=base build folderRef fileRef rc folderid _abort_ fileId additionalContent) @@ -3457,7 +3618,7 @@ data _null_; %end; put +(-1) '`.;''' / ' !! '' %put The macro generated: '' !! put(dtCASLudf, E8601DT19.-L) !! ";"' - / ' !! '' %put with the SAS Packages Framework version 20260216.;''' + / ' !! '' %put with the SAS Packages Framework version 20260409.;''' / ' !! '' %put ****************************************************************************;''' / ' !! '' %GOTO theEndOfTheMacro;''' / ' !! '' %end;''' ; @@ -3621,7 +3782,7 @@ data _null_; %end; put +(-1) '`.; '' !!' / ''' %put The macro generated: ''' " !! put(dtIML, E8601DT19.-L) !! " '''; '' !! ' / - ''' %put with the SAS Packages Framework version 20260216.; '' !! ' / + ''' %put with the SAS Packages Framework version 20260409.; '' !! ' / ''' %put ****************************************************************************; '' !! ' / ''' %GOTO theEndOfTheMacro; '' !! ' / ''' %end; '' !! ' / @@ -4493,7 +4654,7 @@ data _null_; %end; put 'put " " / @3 "---------------------------------------------------------------------" / " ";' - / 'put @3 "*SAS package generated by SAS Package Framework, version `20260216`*";' + / 'put @3 "*SAS package generated by SAS Package Framework, version `20260409`*";' / "put @3 '*under `&sysscp.`(`&sysscpl.`) operating system,*';" / "put @3 '*using SAS release: `&sysvlong4.`.*';" / 'put " " / @3 "---------------------------------------------------------------------";'; @@ -4932,7 +5093,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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the test part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; @@ -5614,7 +5775,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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the markdown documentation part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; @@ -5726,7 +5887,7 @@ data &filesWithCodes.markdown; %end; put " " / "---------------------------------------------------------------------" / " " - / "*SAS package generated by SAS Package Framework, version `20260216`,*" + / "*SAS package generated by SAS Package Framework, version `20260409`,*" / "*under `&sysscp.`(`&sysscpl.`) operating system,*" / "*using SAS release: `&sysvlong4.`.*" / " " / "---------------------------------------------------------------------" / " "; @@ -5867,7 +6028,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 20260216.'; +des='SAS Packages Framework internal macro. Executable only inside the %generatePackage() macro. The macro encapsulates the archive version generation part of the process. Version 20260409.'; /* macro picks up all macrovariables from external scope, so from the %generatePackage() macro */ %if %sysmexecname(%sysmexecdepth-1) in (GENERATEPACKAGE) %then %do; @@ -6034,7 +6195,7 @@ TODO: (in Polish) */ )/secure /*** HELP END ***/ -des = 'Macro to load multiple SAS packages at one run, version 20260216. Run %loadPackages() for help info.' +des = 'Macro to load multiple SAS packages at one run, version 20260409. Run %loadPackages() for help info.' parmbuff ; %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then @@ -6050,7 +6211,7 @@ parmbuff %put ### This is short help information for the `loadPackageS` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro wrapper for the loadPackage macro, version `20260216` #; + %put # Macro wrapper for the loadPackage macro, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -6148,7 +6309,7 @@ parmbuff hashing_file() function, SAS 9.4M6 */ )/secure /*** HELP END ***/ -des = 'Macro to verify SAS package with the hash digest, version 20260216. Run %verifyPackage() for help info.' +des = 'Macro to verify SAS package with the hash digest, version 20260409. Run %verifyPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -6163,7 +6324,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260216. Run % %put ### This is short help information for the `verifyPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to verify SAS package with it hash digest, version `20260216` #; + %put # Macro to verify SAS package with it hash digest, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -6379,7 +6540,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20260216. Run % */ )/secure /*** HELP END ***/ -des = 'Macro to preview content of a SAS package, version 20260216. Run %previewPackage() for help info.' +des = 'Macro to preview content of a SAS package, version 20260409. Run %previewPackage() for help info.' ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %do; @@ -6394,7 +6555,7 @@ des = 'Macro to preview content of a SAS package, version 20260216. Run %preview %put ### This is short help information for the `previewPackage` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to get preview of a SAS packages, version `20260216` #; + %put # Macro to get preview of a SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -6528,7 +6689,7 @@ des = 'Macro to preview content of a SAS package, version 20260216. Run %preview when empty the "packages" value is used */ )/secure /*** HELP END ***/ -des = 'Macro to list directories pointed by "packages" fileref, version 20260216. Run %extendPackagesFileref(HELP) for help info.' +des = 'Macro to list directories pointed by "packages" fileref, version 20260409. Run %extendPackagesFileref(HELP) for help info.' ; %if %QUPCASE(&packages.) = HELP %then @@ -6544,7 +6705,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20260216 %put ### This is short help information for the `extendPackagesFileref` macro #; %put #-----------------------------------------------------------------------------------------#;; %put # #; - %put # Macro to list directories pointed by 'packages' fileref, version `20260216` #; + %put # Macro to list directories pointed by 'packages' fileref, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -6646,7 +6807,7 @@ filename packages list; is provided in required version */ )/secure /*** HELP END ***/ -des = 'Macro to load additional content for a SAS package, version 20260216. Run %loadPackageAddCnt() for help info.' +des = 'Macro to load additional content for a SAS package, version 20260409. Run %loadPackageAddCnt() for help info.' minoperator ; %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then @@ -6662,7 +6823,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 `20260216` #; + %put # Macro to *load* additional content for a SAS package, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -7033,7 +7194,7 @@ minoperator ,nobs=0 /* technical parameter */ ) /*** HELP END ***/ -/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260216. Run %splitCodeForPackage() for help info.' +/ des = 'Utility macro to split "one big" code into multiple files for a SAS package, version 20260409. Run %splitCodeForPackage() for help info.' ; %if (%superq(codeFile) = ) OR (%qupcase(&codeFile.) = HELP) %then %do; @@ -7049,7 +7210,7 @@ minoperator %put #-------------------------------------------------------------------------------#; %put # #; %put # Utility macro to *split* single file with SAS package code into multiple #; - %put # files with separate snippets, version `20260216` #; + %put # files with separate snippets, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -7425,7 +7586,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 20260216. */'; + put '/* File generated with help of SAS Packages Framework, version 20260409. */'; firstLine[j]=0; end; put _infile_; @@ -7458,7 +7619,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 20260216. Run %relocatePackage() for help info.' +/ des = 'Utility macro that locally Copies or Moves Packages, version 20260409. Run %relocatePackage() for help info.' secure minoperator ; @@ -7476,7 +7637,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 `20260216` #; + %put # Macro to *locally copy or move* (relocate) SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -8134,7 +8295,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 20260216.' +des = 'Macro to check if the PACKAGES fileref is "correct", type %isPackagesFilerefOK(HELP) for help, version 20260409.' ; /*** HELP END ***/ %if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then @@ -8150,7 +8311,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 `20260216` #; + %put # Macro to check if the `packages` fileref is "correct", version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -8284,7 +8445,7 @@ SPFmacroName /* space separated list of names */ / minoperator secure -des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260216. Run %SasPackagesFrameworkNotes(HELP) for help info.' +des = 'Macro to provide help notes about SAS Packages Framework macros, version 20260409. Run %SasPackagesFrameworkNotes(HELP) for help info.' ; %local list N i element; %let list= @@ -8330,7 +8491,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 `20260216` #; + %put # Macro prints help notes for SAS Packages Framework macros, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -8453,7 +8614,7 @@ options mlogic symbolgen; ,packagesRef=packages ,ods= /* data set for report file */ )/ -des='Macro to create a bundle of SAS packages, version 20260216. Run %bundlePackages(HELP) for help info.' +des='Macro to create a bundle of SAS packages, version 20260409. Run %bundlePackages(HELP) for help info.' secure minoperator ; @@ -8470,7 +8631,7 @@ secure minoperator %put ### This is short help information for the `bundlePackages` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *create bundles* of SAS packages, version `20260216` #; + %put # Macro to *create bundles* of SAS packages, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; @@ -8955,7 +9116,7 @@ filename p2 "R:/dontexist"; ,ods= /* data set for report file */ ,verify=0 )/ -des='Macro to extract a bundle of SAS packages, version 20260216. Run %unbundlePackages(HELP) for help info.' +des='Macro to extract a bundle of SAS packages, version 20260409. Run %unbundlePackages(HELP) for help info.' secure minoperator ; @@ -8973,7 +9134,7 @@ minoperator %put ### This is short help information for the `unbundlePackages` macro #; %put #-------------------------------------------------------------------------------#; %put # #; - %put # Macro to *extract* SAS packages from a bundle, version `20260216` #; + %put # Macro to *extract* SAS packages from a bundle, version `20260409` #; %put # #; %put # A SAS package is a zip file containing a group #; %put # of SAS codes (macros, functions, data steps generating #; diff --git a/packages/README.md b/packages/README.md index 0fefea2..f0231bc 100644 --- a/packages/README.md +++ b/packages/README.md @@ -10,7 +10,7 @@ Packages: --- -- **SQLinDS**\[2.3.2\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g. +- **SQLinDS**\[2.3.3\], based on Mike Rhoads' article *Use the Full Power of SAS in Your Function-Style Macros*. The package allows to write SQL queries in the data step, e.g. ```sas data class; set %SQL( @@ -22,13 +22,13 @@ data class; WH = weight + height; run; ``` -SHA256 digest for SQLinDS: F*CEAA4C90515F6E8AACBFFD55ABA6544E399EDBE0A7081107B62DCEE6F5430A1D +SHA256 digest for SQLinDS: F*6CC51325BDCE164B2E811896DD1C3A6D44242F50CC313D0721350CA49975F628 [Documentation for SQLinDS](https://github.com/SASPAC/blob/main/sqlinds.md "Documentation for SQLinDS") --- -- **DFA** (Dynamic Function Arrays)\[0.5.9\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples. +- **DFA** (Dynamic Function Arrays)\[0.5.10\], contains set of macros and FCMP functions which implement: a dynamically allocated array, a stack, a fifo queue, an ordered stack, and a priority queue, run `%helpPackage(DFA,createDFArray)` to find examples. ```sas %createDFArray(ArrDynamic, resizefactor=17); @@ -55,13 +55,13 @@ data _null_; end; run; ``` -SHA256 digest for DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49 +SHA256 digest for DFA: F*C1E5126D8EDE050A758BCB5DCCA56A37125B3646CE75F1CF41EDE00890901AD9 [Documentation for DFA](https://github.com/SASPAC/blob/main/dfa.md "Documentation for DFA") --- -- **macroArray**\[1.3.1\], implementation of an array concept in a macro language, e.g. +- **macroArray**\[1.3.2\], implementation of an array concept in a macro language, e.g. ```sas %array(ABC[17] (111:127), macarray=Y); @@ -80,13 +80,13 @@ SHA256 digest for DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08 which = 1:H:2 ); ``` -SHA256 digest for macroArray: F*9DA64CA9A745E1DB7176F7AF4459BB014F61F71626473ABF6471A32689E14FF1 +SHA256 digest for macroArray: F*35A657517CD2B1AB86C4E7C5320B5EDDDFBA9348075AE31DDAF875CF0CC193C9 [Documentation for macroArray](https://github.com/SASPAC/blob/main/macroarray.md "Documentation for macroArray") --- -- **BasePlus**\[3.1.3\] adds a bunch of functionalities I am missing in BASE SAS, such as: +- **BasePlus**\[3.1.4\] adds a bunch of functionalities I am missing in BASE SAS, such as: ```sas call arrMissToRight(myArray); call arrFillMiss(17, myArray); @@ -120,13 +120,13 @@ format x bool.; %workLib(ABC) ``` -SHA256 digest for BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82 +SHA256 digest for BasePlus: F*BD248E5F8CBD94B5F45467B723A73D97D646CD665BA98679F87C7A03A484E83E [Documentation for BasePlus](https://github.com/SASPAC/blob/main/baseplus.md "Documentation for BasePlus") --- -- **GSM** (Generate Secure Macros)\[0.22.2\], package allows +- **GSM** (Generate Secure Macros)\[0.22.3\], package allows to create secured macros stored in SAS Proc FCMP functions. The dataset with functions can be shared between different operating systems and allows to generate macros on site without showing their code. @@ -135,7 +135,7 @@ SHA256 digest for BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB7548628 [The WUSS 2023 Conference article describing the idea](https://www.wuss.org/proceedings/2023/WUSS-2023-Paper-189.pdf "Article about the idea GSM") -SHA256 digest for GSM: F*7A4FEC410DEB921613A33F154FBBE332D7EC4C4DAC1351A4E611D986489EE848 +SHA256 digest for GSM: F*411452E8388C181800023A01A3B7DC7904A80A915D506D9606638F27CBC282B1 [Documentation for GSM](https://github.com/SASPAC/blob/main/gsm.md "Documentation for GSM") diff --git a/packages/SHA256_for_packages.txt b/packages/SHA256_for_packages.txt index 6c323a3..3c25002 100644 --- a/packages/SHA256_for_packages.txt +++ b/packages/SHA256_for_packages.txt @@ -1,3 +1,10 @@ +/* 20260217 */ +BasePlus: F*BD248E5F8CBD94B5F45467B723A73D97D646CD665BA98679F87C7A03A484E83E +DFA: F*C1E5126D8EDE050A758BCB5DCCA56A37125B3646CE75F1CF41EDE00890901AD9 +GSM: F*411452E8388C181800023A01A3B7DC7904A80A915D506D9606638F27CBC282B1 +macroArray: F*35A657517CD2B1AB86C4E7C5320B5EDDDFBA9348075AE31DDAF875CF0CC193C9 +SQLinDS: F*6CC51325BDCE164B2E811896DD1C3A6D44242F50CC313D0721350CA49975F628 + /* 20260202 */ BasePlus: F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82 DFA: F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49 diff --git a/packages/baseplus.md b/packages/baseplus.md index 3958552..0d25b11 100644 --- a/packages/baseplus.md +++ b/packages/baseplus.md @@ -9,23 +9,21 @@ ### Version information: - Package: BasePlus -- Version: 3.1.3 -- Generated: 2026-02-02T13:52:20 +- Version: 3.1.4 +- Generated: 2026-02-17T12:22:24 - Author(s): Bartosz Jablonski (yabwon@gmail.com), contributors are Quentin McMullen (qmcmullen@gmail.com) and Ryo Nakaya (nakaya.ryou@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - License: MIT -- File SHA256: `F*B762F900EEFF7035880891D89416C0F973E4D377BCB75486283363A9BDADBA82` for this version -- Content SHA256: `C*1CB969446728CD3888BF7046E2463AA74F6A4B2634A0BD2EAD78ED6A526BA7F6` for this version +- File SHA256: `F*BD248E5F8CBD94B5F45467B723A73D97D646CD665BA98679F87C7A03A484E83E` for this version +- Content SHA256: `C*373E1A4CDC1A2462C90D6EC88E2BAA2F9902DFE5C6A4CC70356EE7281337C70A` for this version --- -# The `BasePlus` package, version: `3.1.3`; +# The `BasePlus` package, version: `3.1.4`; --- -# The BasePlus package [ver. 3.1.3] ############################################### - The **BasePlus** package implements useful functions and functionalities I miss in the BASE SAS. @@ -409,7 +407,7 @@ localization (only if additional content was deployed during the installation pr --------------------------------------------------------------------- -*SAS package generated by SAS Package Framework, version `20260202`,* +*SAS package generated by SAS Package Framework, version `20260216`,* *under `WIN`(`X64_10PRO`) operating system,* *using SAS release: `9.04.01M9P06042025`.* diff --git a/packages/baseplus.zip b/packages/baseplus.zip index 29a7c08..9eeae8a 100644 Binary files a/packages/baseplus.zip and b/packages/baseplus.zip differ diff --git a/packages/dfa.md b/packages/dfa.md index df4a6cd..3ad97e2 100644 --- a/packages/dfa.md +++ b/packages/dfa.md @@ -9,23 +9,21 @@ ### Version information: - Package: DFA -- Version: 0.5.9 -- Generated: 2026-02-02T13:54:19 +- Version: 0.5.10 +- Generated: 2026-02-17T12:17:54 - Author(s): Bartosz Jablonski (yabwon@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - License: MIT -- File SHA256: `F*17C88537F5FA9BCFAA1AC4803D0F1EF47665C8446A44C82B5558A08315DF0C49` for this version -- Content SHA256: `C*1818B4D524F779F2FB3A242D9E5BEEB592074A92D68135E18A660E594B214401` for this version +- File SHA256: `F*C1E5126D8EDE050A758BCB5DCCA56A37125B3646CE75F1CF41EDE00890901AD9` for this version +- Content SHA256: `C*EE048846A8155C317867DCDB8EE1AE9E0352235DC247E4379D101A7296BD0C07` for this version --- -# The `DFA` package, version: `0.5.9`; +# The `DFA` package, version: `0.5.10`; --- -# The DFA package [ver. 0.5.9] ############################################### - The **DFA** (a.k.a. *Dynamic Function Array*) package implements: - dynamic numeric and character arrays, - dynamic stacks (filo), @@ -56,7 +54,7 @@ Required SAS Components: --------------------------------------------------------------------- -*SAS package generated by SAS Package Framework, version `20260202`,* +*SAS package generated by SAS Package Framework, version `20260216`,* *under `WIN`(`X64_10PRO`) operating system,* *using SAS release: `9.04.01M9P06042025`.* diff --git a/packages/dfa.zip b/packages/dfa.zip index 2b6cc22..f10869e 100644 Binary files a/packages/dfa.zip and b/packages/dfa.zip differ diff --git a/packages/gsm.md b/packages/gsm.md index 5989710..b24aac1 100644 --- a/packages/gsm.md +++ b/packages/gsm.md @@ -9,23 +9,21 @@ ### Version information: - Package: GSM -- Version: 0.22.2 -- Generated: 2026-01-26T16:44:38 +- Version: 0.22.3 +- Generated: 2026-02-17T12:08:56 - Author(s): Bartosz Jablonski (yabwon@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - License: MIT -- File SHA256: `F*7A4FEC410DEB921613A33F154FBBE332D7EC4C4DAC1351A4E611D986489EE848` for this version -- Content SHA256: `C*99444DE5A473D3F92374ACE917E29E77C1F94BF77E06436695B06B85705606C7` for this version +- File SHA256: `F*411452E8388C181800023A01A3B7DC7904A80A915D506D9606638F27CBC282B1` for this version +- Content SHA256: `C*1955721DDAAE32A631A8071BEE3BC6CF83761C2280DA5F823D4E4CFD96838FD3` for this version --- -# The `GSM` package, version: `0.22.2`; +# The `GSM` package, version: `0.22.3`; --- -# The GSM package [ver. 0.22.2] ############################################### - The **GSM** (a.k.a. *Generate Secure Macros*) package allows to create secured macros stored in SAS Proc FCMP functions. The dataset with functions can be shared and allows to generate @@ -122,7 +120,7 @@ localization (only if additional content was deployed during the installation pr --------------------------------------------------------------------- -*SAS package generated by SAS Package Framework, version `20260126`,* +*SAS package generated by SAS Package Framework, version `20260216`,* *under `WIN`(`X64_10PRO`) operating system,* *using SAS release: `9.04.01M9P06042025`.* diff --git a/packages/gsm.zip b/packages/gsm.zip index 16eac9f..4450791 100644 Binary files a/packages/gsm.zip and b/packages/gsm.zip differ diff --git a/packages/macroarray.md b/packages/macroarray.md index 9aff59d..9b5446c 100644 --- a/packages/macroarray.md +++ b/packages/macroarray.md @@ -9,17 +9,17 @@ ### Version information: - Package: macroArray -- Version: 1.3.1 -- Generated: 2026-01-26T15:33:03 +- Version: 1.3.2 +- Generated: 2026-02-17T08:51:01 - Author(s): Bartosz Jablonski (yabwon@gmail.com) - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - License: MIT -- File SHA256: `F*9DA64CA9A745E1DB7176F7AF4459BB014F61F71626473ABF6471A32689E14FF1` for this version -- Content SHA256: `C*15A52658C8CBF9AB36AB1CA847FA628CCC6E9C67F625FFD3A959EB191445F780` for this version +- File SHA256: `F*35A657517CD2B1AB86C4E7C5320B5EDDDFBA9348075AE31DDAF875CF0CC193C9` for this version +- Content SHA256: `C*DE477F4E280D438B364320F324C88DA3D336F102BA37810C60BDE15398DE84E9` for this version --- -# The `macroArray` package, version: `1.3.1`; +# The `macroArray` package, version: `1.3.2`; --- @@ -43,6 +43,14 @@ Some of components are: - `%mcDictionary()`, - etc. +Read this article to learn more: +"Macro Variable Arrays Made Easy with macroArray SAS Package" + +Link to the text: +`https://www.lexjansen.com/pharmasug/2024/AP/PharmaSUG-2024-AP-108.pdf` +or +`https://www.lexjansen.com/wuss/2024/124_FINAL_paper_pdf.pdf` + *Note:* If you are working with BIG macroarrays do not forget to verify your session setting for macro @@ -75,7 +83,7 @@ Required SAS Components: --------------------------------------------------------------------- -*SAS package generated by SAS Package Framework, version `20260126`,* +*SAS package generated by SAS Package Framework, version `20260216`,* *under `WIN`(`X64_10PRO`) operating system,* *using SAS release: `9.04.01M9P06042025`.* diff --git a/packages/macroarray.zip b/packages/macroarray.zip index 2bdaf63..f43dc3f 100644 Binary files a/packages/macroarray.zip and b/packages/macroarray.zip differ diff --git a/packages/sqlinds.md b/packages/sqlinds.md index aae248d..fbe0221 100644 --- a/packages/sqlinds.md +++ b/packages/sqlinds.md @@ -9,23 +9,21 @@ ### Version information: - Package: SQLinDS -- Version: 2.3.2 -- Generated: 2026-01-26T15:36:16 +- Version: 2.3.3 +- Generated: 2026-02-17T08:25:24 - Author(s): Mike Rhoads (RhoadsM1@Westat.com), contributor Bartosz Jablonski - Maintainer(s): Bartosz Jablonski (yabwon@gmail.com) - License: MIT -- File SHA256: `F*CEAA4C90515F6E8AACBFFD55ABA6544E399EDBE0A7081107B62DCEE6F5430A1D` for this version -- Content SHA256: `C*BD9C8A88831541082BEFC07954D5CDB4A6827D1A7902B911221AC6FE712A087E` for this version +- File SHA256: `F*6CC51325BDCE164B2E811896DD1C3A6D44242F50CC313D0721350CA49975F628` for this version +- Content SHA256: `C*776741E40EB6DCD907640ACA674F092BFAF0F7DE031519B6B453D37F6D6959D9` for this version --- -# The `SQLinDS` package, version: `2.3.2`; +# The `SQLinDS` package, version: `2.3.3`; --- -### The SQLinDS package [ver. 2.3.2] - The **SQLinDS** package is an implementation of the *macro-function-sandwich* concept introduced in the *"Use the Full Power of SAS in Your Function-Style Macros"*, @@ -77,7 +75,7 @@ localization (only if additional content was deployed during the installation pr --------------------------------------------------------------------- -*SAS package generated by SAS Package Framework, version `20260126`,* +*SAS package generated by SAS Package Framework, version `20260216`,* *under `WIN`(`X64_10PRO`) operating system,* *using SAS release: `9.04.01M9P06042025`.* @@ -235,7 +233,7 @@ run he following: # License ###### -Copyright (c) 2012 Mike Rhoads +Copyright (c) since 2012 onward, Mike Rhoads Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/sqlinds.zip b/packages/sqlinds.zip index 3e7fdd6..21f121a 100644 Binary files a/packages/sqlinds.zip and b/packages/sqlinds.zip differ