mirror of
https://github.com/yabwon/SAS_PACKAGES.git
synced 2025-12-15 21:14:34 +00:00
SAS Packages:
To get started with SAS Packages try this Getting Started with SAS Packages presentation (see the ./SPF/Documentation directory).
Available packages:
Currently the following packages are available:
- SQLinDS[2.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.
data class;
set %SQL(
select age, name, weight, height
from sashelp.class
order by age
);
WH = weight + height;
run;
SHA256 digest for SQLinDS: 3034A0C8AC43683AD55698861DBBDEBDE6FC8567D59ECF2BB5F3389FE6BC8062
- MacroCore[1], a macro library for SAS application developers. Over 100 macros for Base SAS, metadata, and Viya. Provided by the SASjs framework.
SHA256 digest for MacroCore: A23C29529F3CE7D0C8BEE9545C5D22D5B5594907547374A5135B8E5A48D7687B
- DFA (Dynamic Function Arrays)[0.5], 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.
%createDFArray(ArrDynamic, resizefactor=17);
data _null_;
call ArrDynamic("Allocate", -2, 2);
do i = -2 to 2;
call ArrDynamic("Input", i, 2**i);
end;
L = .; H = .;
call ArrDynamic("Dim", L, H);
put L= H=;
call ArrDynamic("+", 3, 8);
call ArrDynamic("+",-3, 0.125);
call ArrDynamic("Dim", L, H);
put L= H=;
Value = .;
do i = L to H;
call ArrDynamic("O", i, Value);
put i= Value=;
end;
run;
SHA256 digest for DFA: 179AAB9DF3DE8F049A4EFDF5FB0BE92AE5F7BFA7708D4365F39D4DC71C4F90FE
- macroArray[0.8], implementation of an array concept in a macro language, e.g.
%array(ABC[17] (111:127), macarray=Y);
%macro test();
%do i = 1 %to 17;
%put &i.) %ABC(&i.);
%end;
%mend;
%test()
%let %ABC(13,i) = 99999; /* i = insert */
%do_over(ABC, phrase=%nrstr(
%put &_i_.%) %ABC(&_i_.);
),
which = 1:H:2
);
SHA256 digest for macroArray: 42E87B80450B3E1AD462B9B63B41F34C83B7745AA0F98C3CA72AA19F3B1FF10E
- BasePlus[0.991] adds a bunch of functionalities I am missing in BASE SAS, such as:
call arrMissToRight(myArray);
call arrFillMiss(17, myArray);
call arrFill(42, myArray);
rc = delDataset("DataSetToDrop");
string = catXFn("date9.", "#", myArray);
format x bool.;
%put %getVars(sashelp.class, pattern = ght$, sep = +, varRange = _numeric_);
SHA256 digest for BasePlus: 28F3DE865C5E3B914FFB7CC2627D8B0975527EEECEE7AFEAD7B335C3FDC1BFD3
- dynMacroArray[0.2], set of macros (wrappers for a hash table) emulating dynamic array in the data step (macro predecessor of DFA)
SHA256 digest for dynMacroArray: 8B0777EA3CF41968C0B029AA57B1F809D21D1BAB1B88A35B0EA5DB3C6DD9E748