Merge pull request #58 from yabwon/main

SAS Packages Framework, version 20221107
This commit is contained in:
Bart Jablonski
2022-11-07 10:48:49 +01:00
committed by GitHub
14 changed files with 75 additions and 68 deletions

View File

@@ -8,7 +8,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. 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 **`20221022`**. In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. **The latest version** of SPF is **`20221107`**.
To get started with SAS Packages try this [**`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). To get started with SAS Packages try this [**`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).
@@ -23,6 +23,7 @@ Short description of the SAS Packages Framework macros can be found [here](https
- [SAS dla Administratorów i Praktyków 2020](https://www.youtube.com/watch?v=mXuep2k48Z8&feature=youtu.be&t=0s "SASAiP2020") (October 2020, in Polish) - [SAS dla Administratorów i Praktyków 2020](https://www.youtube.com/watch?v=mXuep2k48Z8&feature=youtu.be&t=0s "SASAiP2020") (October 2020, in Polish)
- [Boston Area SAS Users Group webinar](https://www.basug.org/videos?wix-vod-video-id=78067e61413d43d3a6951974b3bc3014&wix-vod-comp-id=comp-klv807gt "BASUG") (November 2020) - [Boston Area SAS Users Group webinar](https://www.basug.org/videos?wix-vod-video-id=78067e61413d43d3a6951974b3bc3014&wix-vod-comp-id=comp-klv807gt "BASUG") (November 2020)
- [SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th, 2021) - [SAS Global Forum 2021 V.E.](https://www.youtube.com/watch?v=hqexaQtGw88 "SGF2021") (May 20th, 2021)
- [SAS Explore 2022](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "SASexplore") (September 27th-29th, 2022)
--- ---

View File

@@ -6,7 +6,7 @@
when empty the "packages" value is used */ when empty the "packages" value is used */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20221022. Run %extendPackagesFileref(HELP) for help info.' des = 'Macro to list directories pointed by "packages" fileref, version 20221107. Run %extendPackagesFileref(HELP) for help info.'
; ;
%if %QUPCASE(&packages.) = HELP %then %if %QUPCASE(&packages.) = HELP %then
@@ -22,7 +22,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20221022
%put ### This is short help information for the `extendPackagesFileref` macro #; %put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20221022` #; %put # Macro to list directories pointed by 'packages' fileref, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -23,7 +23,7 @@
default value 1 means "delete tests work" */ default value 1 means "delete tests work" */
)/secure minoperator )/secure minoperator
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage() for help info.' des = 'Macro to generate SAS packages, version 20221107. Run %generatePackage() for help info.'
; ;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then %if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do; %do;
@@ -38,7 +38,7 @@ des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #; %put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to generate SAS packages, version `20221022` #; %put # Macro to generate SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -95,6 +95,7 @@ des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage()
%GOTO ENDofgeneratePackage; %GOTO ENDofgeneratePackage;
%end; %end;
%put --- generatePackage START ---;
%local zipReferrence filesWithCodes _DESCR_ _LIC_ _DUMMY_ _RC_ _PackageFileref_; %local zipReferrence filesWithCodes _DESCR_ _LIC_ _DUMMY_ _RC_ _PackageFileref_;
%let zipReferrence = _%sysfunc(datetime(), hex6.)_; %let zipReferrence = _%sysfunc(datetime(), hex6.)_;
%let filesWithCodes = WORK._%sysfunc(datetime(), hex16.)_; %let filesWithCodes = WORK._%sysfunc(datetime(), hex16.)_;
@@ -250,7 +251,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
put 'ERROR- ' R; put 'ERROR- ' R;
end; end;
else else
rc = dosubl('title; options nonotes nosource ps=max ls=99 nodate nonumber nostimer; rc = dosubl('title; options nonotes nosource ps=min ls=99 nodate nonumber nostimer;
data _null_; data _null_;
length rq $ 64; put "Required:"; length rq $ 64; put "Required:";
do rq = &packageRequired.; do rq = &packageRequired.;
@@ -300,7 +301,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
put 'ERROR- ' R; put 'ERROR- ' R;
end; end;
else else
rc = dosubl('title; options nonotes nosource ps=max ls=66 nodate nonumber nostimer; rc = dosubl('title; options nonotes nosource ps=min ls=66 nodate nonumber nostimer;
data _null_; data _null_;
length rq $ 64; put "ReqPackages:"; length rq $ 64; put "ReqPackages:";
do rq = &packageReqPackages.; do rq = &packageReqPackages.;
@@ -1675,7 +1676,7 @@ data _null_;
put ' end ; '; put ' end ; ';
%end; %end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20221022 *"; put "***";'; put 'put "***"; put "* SAS package generated by generatePackage, version 20221107 *"; put "***";';
put 'run; ' /; put 'run; ' /;
@@ -2434,7 +2435,7 @@ title;
/*%put _local_;*/ /*%put _local_;*/
%put NOTE: changing current folder to:; %put NOTE: Changing current folder to:;
%put NOTE- *%sysfunc(DLGCDIR(%sysfunc(pathname(currdir))))*; %put NOTE- *%sysfunc(DLGCDIR(%sysfunc(pathname(currdir))))*;
filename CURRDIR clear; filename CURRDIR clear;
@@ -2454,6 +2455,7 @@ options &qlenmax_fstimer_tmp.;
%ENDofgeneratePackage: %ENDofgeneratePackage:
%put --- generatePackage END ---;
%mend generatePackage; %mend generatePackage;

View File

@@ -24,7 +24,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to get help about SAS package, version 20221022. Run %helpPackage() for help info.' des = 'Macro to get help about SAS package, version 20221107. Run %helpPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -39,7 +39,7 @@ des = 'Macro to get help about SAS package, version 20221022. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #; %put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get help about SAS packages, version `20221022` #; %put # Macro to get help about SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -169,7 +169,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE] - add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/ */
/* Macros to install SAS packages, version 20221022 */ /* Macros to install SAS packages, version 20221107 */
/* A SAS package is a zip file containing a group of files /* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by data, etc.) wrapped up together and %INCLUDEed by

View File

@@ -14,7 +14,7 @@
/secure /secure
minoperator minoperator
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to install SAS package, version 20221022. Run %%installPackage() for help info.' des = 'Macro to install SAS package, version 20221107. Run %%installPackage() for help info.'
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do; %do;
@@ -29,7 +29,7 @@ des = 'Macro to install SAS package, version 20221022. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #; %put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;; %put #--------------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to install SAS packages, version `20221022` #; %put # Macro to install SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -458,7 +458,7 @@ des = 'Macro to install SAS package, version 20221022. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder. /* Macro to list SAS packages in packages folder.
Version 20221022 Version 20221107
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating

View File

@@ -1,7 +1,7 @@
/*+listPackages+*/ /*+listPackages+*/
%macro listPackages()/secure PARMBUFF %macro listPackages()/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221022.' des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221107.'
; ;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then %if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do; %do;
@@ -16,7 +16,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #; %put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list available SAS packages, version `20221022` #; %put # Macro to list available SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -166,7 +166,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
/* Macro to generate SAS packages. /* Macro to generate SAS packages.
Version 20221022 Version 20221107
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating

View File

@@ -27,7 +27,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load SAS package, version 20221022. Run %loadPackage() for help info.' des = 'Macro to load SAS package, version 20221107. Run %loadPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -42,7 +42,7 @@ des = 'Macro to load SAS package, version 20221022. Run %loadPackage() for help
%put ### This is short help information for the `loadPackage` macro #; %put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to *load* SAS packages, version `20221022` #; %put # Macro to *load* SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -11,7 +11,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20221022. Run %loadPackages() for help info.' des = 'Macro to load multiple SAS packages at one run, version 20221107. Run %loadPackages() for help info.'
parmbuff parmbuff
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -27,7 +27,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #; %put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro wrapper for the loadPackage macro, version `20221022` #; %put # Macro wrapper for the loadPackage macro, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -23,7 +23,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20221022. Run %previewPackage() for help info.' des = 'Macro to preview content of a SAS package, version 20221107. Run %previewPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -38,7 +38,7 @@ des = 'Macro to preview content of a SAS package, version 20221022. Run %preview
%put ### This is short help information for the `previewPackage` macro #; %put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get previwe of a SAS packages, version `20221022` #; %put # Macro to get previwe of a SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -20,7 +20,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to unload SAS package, version 20221022. Run %unloadPackage() for help info.' des = 'Macro to unload SAS package, version 20221107. Run %unloadPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -35,7 +35,7 @@ des = 'Macro to unload SAS package, version 20221022. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #; %put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to unload SAS packages, version `20221022` #; %put # Macro to unload SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -13,7 +13,7 @@
hashing_file() function, SAS 9.4M6 */ hashing_file() function, SAS 9.4M6 */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20221022. Run %verifyPackage() for help info.' des = 'Macro to verify SAS package with the hash digest, version 20221107. Run %verifyPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -28,7 +28,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221022. Run %
%put ### This is short help information for the `verifyPackage` macro #; %put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to verify SAS package with it hash digest, version `20221022` #; %put # Macro to verify SAS package with it hash digest, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -21,7 +21,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. 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 **`20221022`**. In this repository we are presenting the **SAS Packages Framework** which allows to develop and use SAS packages. The latest version of SPF is **`20221107`**.
**To get started with SAS Packages** try this [**`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). **To get started with SAS Packages** try this [**`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).
@@ -39,7 +39,7 @@ After assigning the directory do not change them when using the SPF since it may
## This is short help information for the `installPackage` macro <a name="installpackage"></a> ## This is short help information for the `installPackage` macro <a name="installpackage"></a>
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
Macro to install SAS packages, version `20221022` Macro to install SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -141,7 +141,7 @@ filename packages "C:/SAS_PACKAGES";
## This is short help information for the `helpPackage` macro <a name="helppackage"></a> ## This is short help information for the `helpPackage` macro <a name="helppackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to get help about SAS packages, version `20221022` Macro to get help about SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -211,7 +211,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackage` macro <a name="loadpackage"></a> ## This is short help information for the `loadPackage` macro <a name="loadpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to *load* SAS packages, version `20221022` Macro to *load* SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -284,7 +284,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a> ## This is short help information for the `loadPackageS` macro <a name="loadpackages"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro wrapper for the loadPackage macro, version `20221022` Macro wrapper for the loadPackage macro, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -333,7 +333,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a> ## This is short help information for the `unloadPackage` macro <a name="unloadpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to unload SAS packages, version `20221022` Macro to unload SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -398,7 +398,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `listPackages` macro <a name="listpackages"></a> ## This is short help information for the `listPackages` macro <a name="listpackages"></a>
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Macro to list available SAS packages, version `20221022` Macro to list available SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -439,7 +439,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a> ## This is short help information for the `verifyPackage` macro <a name="verifypackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to verify SAS package with it hash digest, version `20221022` Macro to verify SAS package with it hash digest, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -493,7 +493,7 @@ filename packages "C:/SAS_PACKAGES"; %* set-up a directory for packages;
## This is short help information for the `previewPackage` macro <a name="previewpackage"></a> ## This is short help information for the `previewPackage` macro <a name="previewpackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to get previwe of a SAS packages, version `20221022` Macro to get previwe of a SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -560,7 +560,7 @@ filename packages "C:/SAS_PACKAGES"; %* setup a directory for packages;
## This is short help information for the `generatePackage` macro <a name="generatepackage"></a> ## This is short help information for the `generatePackage` macro <a name="generatepackage"></a>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Macro to generate SAS packages, version `20221022` Macro to generate SAS packages, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -741,7 +741,7 @@ All files have to have `.sas` extension. Other files are ignored.
## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a> ## This is short help information for the `extendPackagesFileref` macro <a name="extendpackagesfileref"></a>
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Macro to list directories pointed by 'packages' fileref, version `20221022` Macro to list directories pointed by 'packages' fileref, version `20221107`
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating

View File

@@ -42,7 +42,7 @@
- to unload, or - to unload, or
- to generate SAS packages. - to generate SAS packages.
Version 20221022. Version 20221107.
See examples below. See examples below.
A SAS package is a zip file containing a group of files A SAS package is a zip file containing a group of files
@@ -82,7 +82,7 @@
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load SAS package, version 20221022. Run %loadPackage() for help info.' des = 'Macro to load SAS package, version 20221107. Run %loadPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -97,7 +97,7 @@ des = 'Macro to load SAS package, version 20221022. Run %loadPackage() for help
%put ### This is short help information for the `loadPackage` macro #; %put ### This is short help information for the `loadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to *load* SAS packages, version `20221022` #; %put # Macro to *load* SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -283,7 +283,7 @@ des = 'Macro to load SAS package, version 20221022. Run %loadPackage() for help
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to unload SAS package, version 20221022. Run %unloadPackage() for help info.' des = 'Macro to unload SAS package, version 20221107. Run %unloadPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -298,7 +298,7 @@ des = 'Macro to unload SAS package, version 20221022. Run %unloadPackage() for h
%put ### This is short help information for the `unloadPackage` macro #; %put ### This is short help information for the `unloadPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to unload SAS packages, version `20221022` #; %put # Macro to unload SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -443,7 +443,7 @@ des = 'Macro to unload SAS package, version 20221022. Run %unloadPackage() for h
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to get help about SAS package, version 20221022. Run %helpPackage() for help info.' des = 'Macro to get help about SAS package, version 20221107. Run %helpPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -458,7 +458,7 @@ des = 'Macro to get help about SAS package, version 20221022. Run %helpPackage()
%put ### This is short help information for the `helpPackage` macro #; %put ### This is short help information for the `helpPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get help about SAS packages, version `20221022` #; %put # Macro to get help about SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -588,7 +588,7 @@ TODO:
- add MD5(&packageName.) value hash instead "package" word in filenames [DONE] - add MD5(&packageName.) value hash instead "package" word in filenames [DONE]
*/ */
/* Macros to install SAS packages, version 20221022 */ /* Macros to install SAS packages, version 20221107 */
/* A SAS package is a zip file containing a group of files /* A SAS package is a zip file containing a group of files
with SAS code (macros, functions, data steps generating with SAS code (macros, functions, data steps generating
data, etc.) wrapped up together and %INCLUDEed by data, etc.) wrapped up together and %INCLUDEed by
@@ -611,7 +611,7 @@ TODO:
/secure /secure
minoperator minoperator
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to install SAS package, version 20221022. Run %%installPackage() for help info.' des = 'Macro to install SAS package, version 20221107. Run %%installPackage() for help info.'
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
%do; %do;
@@ -626,7 +626,7 @@ des = 'Macro to install SAS package, version 20221022. Run %%installPackage() fo
%put ### This is short help information for the `installPackage` macro #; %put ### This is short help information for the `installPackage` macro #;
%put #--------------------------------------------------------------------------------------------#;; %put #--------------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to install SAS packages, version `20221022` #; %put # Macro to install SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -1055,7 +1055,7 @@ des = 'Macro to install SAS package, version 20221022. Run %%installPackage() fo
/* Macro to list SAS packages in packages folder. /* Macro to list SAS packages in packages folder.
Version 20221022 Version 20221107
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -1076,7 +1076,7 @@ des = 'Macro to install SAS package, version 20221022. Run %%installPackage() fo
/*+listPackages+*/ /*+listPackages+*/
%macro listPackages()/secure PARMBUFF %macro listPackages()/secure PARMBUFF
des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221022.' des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HELP) for help, version 20221107.'
; ;
%if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then %if %QUPCASE(&SYSPBUFF.) = %str(%(HELP%)) %then
%do; %do;
@@ -1091,7 +1091,7 @@ des = 'Macro to list SAS packages from `packages` fileref, type %listPackages(HE
%put ### This is short help information for the `listPackages` macro #; %put ### This is short help information for the `listPackages` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list available SAS packages, version `20221022` #; %put # Macro to list available SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -1241,7 +1241,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
/* Macro to generate SAS packages. /* Macro to generate SAS packages.
Version 20221022 Version 20221107
A SAS package is a zip file containing a group A SAS package is a zip file containing a group
of SAS codes (macros, functions, data steps generating of SAS codes (macros, functions, data steps generating
@@ -1278,7 +1278,7 @@ options ls = &ls_tmp. ps = &ps_tmp. &notes_tmp. &source_tmp.;
default value 1 means "delete tests work" */ default value 1 means "delete tests work" */
)/secure minoperator )/secure minoperator
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage() for help info.' des = 'Macro to generate SAS packages, version 20221107. Run %generatePackage() for help info.'
; ;
%if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then %if (%superq(filesLocation) = ) OR (%qupcase(&filesLocation.) = HELP) %then
%do; %do;
@@ -1293,7 +1293,7 @@ des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage()
%put ### This is short help information for the `generatePackage` macro #; %put ### This is short help information for the `generatePackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to generate SAS packages, version `20221022` #; %put # Macro to generate SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -1350,6 +1350,7 @@ des = 'Macro to generate SAS packages, version 20221022. Run %generatePackage()
%GOTO ENDofgeneratePackage; %GOTO ENDofgeneratePackage;
%end; %end;
%put --- generatePackage START ---;
%local zipReferrence filesWithCodes _DESCR_ _LIC_ _DUMMY_ _RC_ _PackageFileref_; %local zipReferrence filesWithCodes _DESCR_ _LIC_ _DUMMY_ _RC_ _PackageFileref_;
%let zipReferrence = _%sysfunc(datetime(), hex6.)_; %let zipReferrence = _%sysfunc(datetime(), hex6.)_;
%let filesWithCodes = WORK._%sysfunc(datetime(), hex16.)_; %let filesWithCodes = WORK._%sysfunc(datetime(), hex16.)_;
@@ -1505,7 +1506,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
put 'ERROR- ' R; put 'ERROR- ' R;
end; end;
else else
rc = dosubl('title; options nonotes nosource ps=max ls=99 nodate nonumber nostimer; rc = dosubl('title; options nonotes nosource ps=min ls=99 nodate nonumber nostimer;
data _null_; data _null_;
length rq $ 64; put "Required:"; length rq $ 64; put "Required:";
do rq = &packageRequired.; do rq = &packageRequired.;
@@ -1555,7 +1556,7 @@ filename &_LIC_. "&filesLocation./license.sas" lrecl = 1024;
put 'ERROR- ' R; put 'ERROR- ' R;
end; end;
else else
rc = dosubl('title; options nonotes nosource ps=max ls=66 nodate nonumber nostimer; rc = dosubl('title; options nonotes nosource ps=min ls=66 nodate nonumber nostimer;
data _null_; data _null_;
length rq $ 64; put "ReqPackages:"; length rq $ 64; put "ReqPackages:";
do rq = &packageReqPackages.; do rq = &packageReqPackages.;
@@ -2930,7 +2931,7 @@ data _null_;
put ' end ; '; put ' end ; ';
%end; %end;
put 'put "***"; put "* SAS package generated by generatePackage, version 20221022 *"; put "***";'; put 'put "***"; put "* SAS package generated by generatePackage, version 20221107 *"; put "***";';
put 'run; ' /; put 'run; ' /;
@@ -3689,7 +3690,7 @@ title;
/*%put _local_;*/ /*%put _local_;*/
%put NOTE: changing current folder to:; %put NOTE: Changing current folder to:;
%put NOTE- *%sysfunc(DLGCDIR(%sysfunc(pathname(currdir))))*; %put NOTE- *%sysfunc(DLGCDIR(%sysfunc(pathname(currdir))))*;
filename CURRDIR clear; filename CURRDIR clear;
@@ -3709,6 +3710,7 @@ options &qlenmax_fstimer_tmp.;
%ENDofgeneratePackage: %ENDofgeneratePackage:
%put --- generatePackage END ---;
%mend generatePackage; %mend generatePackage;
@@ -3788,7 +3790,7 @@ TODO: (in Polish)
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to load multiple SAS packages at one run, version 20221022. Run %loadPackages() for help info.' des = 'Macro to load multiple SAS packages at one run, version 20221107. Run %loadPackages() for help info.'
parmbuff parmbuff
; ;
%if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then %if (%superq(packagesNames) = ) OR (%qupcase(&packagesNames.) = HELP) %then
@@ -3804,7 +3806,7 @@ parmbuff
%put ### This is short help information for the `loadPackageS` macro #; %put ### This is short help information for the `loadPackageS` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro wrapper for the loadPackage macro, version `20221022` #; %put # Macro wrapper for the loadPackage macro, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -3901,7 +3903,7 @@ parmbuff
hashing_file() function, SAS 9.4M6 */ hashing_file() function, SAS 9.4M6 */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to verify SAS package with the hash digest, version 20221022. Run %verifyPackage() for help info.' des = 'Macro to verify SAS package with the hash digest, version 20221107. Run %verifyPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -3916,7 +3918,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221022. Run %
%put ### This is short help information for the `verifyPackage` macro #; %put ### This is short help information for the `verifyPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to verify SAS package with it hash digest, version `20221022` #; %put # Macro to verify SAS package with it hash digest, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -4087,7 +4089,7 @@ des = 'Macro to verify SAS package with the hash digest, version 20221022. Run %
*/ */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to preview content of a SAS package, version 20221022. Run %previewPackage() for help info.' des = 'Macro to preview content of a SAS package, version 20221107. Run %previewPackage() for help info.'
; ;
%if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then %if (%superq(packageName) = ) OR (%qupcase(&packageName.) = HELP) %then
%do; %do;
@@ -4102,7 +4104,7 @@ des = 'Macro to preview content of a SAS package, version 20221022. Run %preview
%put ### This is short help information for the `previewPackage` macro #; %put ### This is short help information for the `previewPackage` macro #;
%put #-------------------------------------------------------------------------------#; %put #-------------------------------------------------------------------------------#;
%put # #; %put # #;
%put # Macro to get previwe of a SAS packages, version `20221022` #; %put # Macro to get previwe of a SAS packages, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;
@@ -4229,7 +4231,7 @@ des = 'Macro to preview content of a SAS package, version 20221022. Run %preview
when empty the "packages" value is used */ when empty the "packages" value is used */
)/secure )/secure
/*** HELP END ***/ /*** HELP END ***/
des = 'Macro to list directories pointed by "packages" fileref, version 20221022. Run %extendPackagesFileref(HELP) for help info.' des = 'Macro to list directories pointed by "packages" fileref, version 20221107. Run %extendPackagesFileref(HELP) for help info.'
; ;
%if %QUPCASE(&packages.) = HELP %then %if %QUPCASE(&packages.) = HELP %then
@@ -4245,7 +4247,7 @@ des = 'Macro to list directories pointed by "packages" fileref, version 20221022
%put ### This is short help information for the `extendPackagesFileref` macro #; %put ### This is short help information for the `extendPackagesFileref` macro #;
%put #-----------------------------------------------------------------------------------------#;; %put #-----------------------------------------------------------------------------------------#;;
%put # #; %put # #;
%put # Macro to list directories pointed by 'packages' fileref, version `20221022` #; %put # Macro to list directories pointed by 'packages' fileref, version `20221107` #;
%put # #; %put # #;
%put # A SAS package is a zip file containing a group #; %put # A SAS package is a zip file containing a group #;
%put # of SAS codes (macros, functions, data steps generating #; %put # of SAS codes (macros, functions, data steps generating #;

View File

@@ -77,6 +77,8 @@ Kudos to all who inspired me to generate this package:
*Michal Ludwicki*, *Michal Ludwicki*,
*Quentin McMullen*. *Quentin McMullen*.
Recording from the SAS Explore 2022 conference: [A BasePlus Package for SAS](https://communities.sas.com/t5/SAS-Explore-Presentations/A-BasePlus-Package-for-SAS/ta-p/838246 "A BasePlus Package for SAS") (September 27th-29th, 2022).
--- ---
### BASIC EXAMPLES AND USECASES: #################################################### ### BASIC EXAMPLES AND USECASES: ####################################################
@@ -3934,7 +3936,7 @@ The basic syntax is the following, the `<...>` means optional parameters:
## License #################################################################### ## License ####################################################################
Copyright (c) 2020 Bartosz Jablonski Copyright (c) since 2020 Bartosz Jablonski
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal