![]() |
Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
|
► base | Regular Base SAS Macros |
mf_abort.sas | Abort gracefully according to context |
mf_existds.sas | Checks whether a dataset OR a view exists |
mf_existfeature.sas | Checks whether a feature exists |
mf_existvar.sas | Checks if a variable exists in a data set |
mf_existvarlist.sas | Checks if a set of variables ALL exist in a data set |
mf_getattrc.sas | Returns a character attribute of a dataset |
mf_getattrn.sas | Returns a numeric attribute of a dataset |
mf_getengine.sas | Returns the engine type of a SAS library |
mf_getfilesize.sas | Returns the size of a file in bytes |
mf_getkeyvalue.sas | Retrieves a key value pair from a control dataset |
mf_getplatform.sas | Returns platform specific variables |
mf_getquotedstr.sas | Adds custom quotes / delimiters to a delimited string |
mf_getschema.sas | Returns the database schema of a SAS library |
mf_getuniquefileref.sas | Assigns and returns an unused fileref |
mf_getuniquelibref.sas | Returns an unused libref |
mf_getuniquename.sas | Returns a shortened (32 char) GUID as a valid SAS name |
mf_getuser.sas | Returns a userid according to session context |
mf_getvalue.sas | Retrieves a value from a dataset. If no filter supplied, then first record is used |
mf_getvarcount.sas | Returns number of variables in a dataset |
mf_getvarformat.sas | Returns the format of a variable |
mf_getvarlen.sas | Returns the length of a variable |
mf_getvarlist.sas | Returns dataset variable list direct from header |
mf_getvarnum.sas | Returns the position of a variable in dataset (varnum attribute) |
mf_getvartype.sas | Returns variable type - Character (C) or Numeric (N) |
mf_isblank.sas | Checks whether a macro variable is empty (blank) |
mf_isdir.sas | Checks whether a path is a valid directory |
mf_loc.sas | Returns physical location of various SAS items |
mf_mkdir.sas | Creates a directory, including any intermediate directories |
mf_mval.sas | Returns a macro variable value if the variable exists |
mf_nobs.sas | Returns number of logical (undeleted) observations |
mf_trimstr.sas | Removes character(s) from the end, if they exist |
mf_uid.sas | Creates a Unique ID based on system time in a friendly format |
mf_verifymacvars.sas | Checks if a set of macro variables exist / contain values |
mf_wordsinstr1butnotstr2.sas | Returns words that are in string 1 but not in string 2 |
mp_abort.sas | Abort gracefully according to context |
mp_binarycopy.sas | Copy any file using binary input / output streams |
mp_cleancsv.sas | Fixes embedded cr / lf / crlf in CSV |
mp_createconstraints.sas | Creates constraints |
mp_createwebservice.sas | Create a web service in SAS 9 or Viya |
mp_csv2ds.sas | Efficient import of arbitrary CSV using a dataset as template |
mp_deleteconstraints.sas | Delete constraionts |
mp_dirlist.sas | Returns all files and subdirectories within a specified parent |
mp_distinctfmtvalues.sas | Creates a dataset containing distinct formatted values |
mp_dropmembers.sas | Drops tables / views (if they exist) without warnings in the log |
mp_ds2cards.sas | Create a CARDS file from a SAS dataset |
mp_ds2csv.sas | Export a dataset to a CSV file |
mp_getconstraints.sas | Get constraint details at column level |
mp_getdbml.sas | Extract DBML from SAS Libraries |
mp_getddl.sas | Extract DDL in various formats, by table or library |
mp_getmaxvarlengths.sas | Scans a dataset to find the max length of the variable values |
mp_guesspk.sas | Guess the primary key of a table |
mp_jsonout.sas | Writes JSON in SASjs format to a fileref |
mp_lib2cards.sas | Convert all library members to CARDS files |
mp_perflog.sas | Logs the time the macro was executed in a control dataset |
mp_prevobs.sas | Enables previous observations to be re-instated |
mp_recursivejoin.sas | Returns all children from a hierarchy table for a specified parent |
mp_resetoption.sas | Reset an option to original value |
mp_runddl.sas | An opinionated way to execute DDL files in SAS |
mp_searchcols.sas | Searches all columns in a library |
mp_searchdata.sas | Searches all data in a library |
mp_setkeyvalue.sas | Logs a key value pair a control dataset |
mp_stprequests.sas | Capture session start / finish times and request details |
mp_streamfile.sas | Streams a file to _webout according to content type |
mp_testwritespeedlibrary.sas | Tests the write speed of a new table in a SAS library |
mp_tree.sas | Recursively scans a directory tree to get all subfolders and content |
mp_unzip.sas | Unzips a zip file |
mp_updatevarlength.sas | Change the length of a variable |
mp_zip.sas | Creates a zip file |
► lua | Lua macros |
ml_json.sas | Compiles the json.lua lua file |
► meta | Metadata Aware Macros |
mm_adduser2group.sas | Adds a user to a group |
mm_assigndirectlib.sas | Assigns library directly using details from metadata |
mm_assignlib.sas | Assigns a meta engine library using LIBREF |
mm_createapplication.sas | Create an Application object in a metadata folder |
mm_createdataset.sas | Create a dataset from a metadata definition |
mm_createdocument.sas | Create a Document object in a metadata folder |
mm_createfolder.sas | Recursively create a metadata folder |
mm_createlibrary.sas | Create a SAS Library |
mm_createstp.sas | Create a type 1 Stored Process (9.2 compatible) |
mm_createwebservice.sas | Create a Web Ready Stored Process |
mm_deletedocument.sas | Deletes a Document using path as reference |
mm_deletestp.sas | Deletes a Stored Process using path as reference |
mm_getauthinfo.sas | Extracts authentication info |
mm_getcols.sas | Creates a dataset with all metadata columns for a particular table |
mm_getdetails.sas | Extracts metadata attributes and associations for a particular uri |
mm_getdirectories.sas | Returns a dataset with the meta directory object for a physical path |
mm_getdocument.sas | Writes the TextStore of a Document Object to an external file |
mm_getfoldertree.sas | Returns all folders / subfolder content for a particular root |
mm_getgroupmembers.sas | Creates dataset with all members of a metadata group |
mm_getgroups.sas | Creates dataset with all groups or just those for a particular user |
mm_getlibs.sas | Creates a dataset with all metadata libraries |
mm_getobjects.sas | Creates a dataset with all metadata objects for a particular type |
mm_getpublictypes.sas | Creates a dataset with all deployable public types |
mm_getrepos.sas | Creates a dataset with all available repositories |
mm_getroles.sas | Creates a table containing a list of roles |
mm_getservercontexts.sas | Creates a dataset with all server contexts in all repos |
mm_getstpcode.sas | Writes the code of an to an external file, or the log if none provided |
mm_getstps.sas | Returns a dataset with all Stored Processes, or just those in a particular folder / with a particular name |
mm_gettableid.sas | Get the metadata id for a particular table |
mm_gettables.sas | Creates a dataset with all metadata tables for a particular library |
mm_gettree.sas | Returns the metadata path and object from either the path or object |
mm_gettypes.sas | Creates a dataset with all metadata types |
mm_getusers.sas | Creates a table containing a list of all users |
mm_getwebappsrvprops.sas | Retrieves properties of the SAS web app server |
mm_spkexport.sas | Creates an batch spk export command |
mm_tree.sas | Returns all folders / subfolder content for a particular root |
mm_updateappextension.sas | Add or update an extension to an application component |
mm_updatedocument.sas | Update the TextStore in a Document with the same name |
mm_updatestpservertype.sas | Updates a type 2 stored process to run on STP or WKS context |
mm_updatestpsourcecode.sas | Update the source code of a type 2 STP |
mm_webout.sas | Send data to/from SAS Stored Processes |
► metax | Metadata Aware Macros with X commmand |
mmx_deletemetafolder.sas | Deletes a metadata folder |
mmx_spkexport.sas | Exports everything in a particular metadata folder |
► viya | Viya macros |
mv_createfolder.sas | Creates a viya folder if that folder does not already exist |
mv_createwebservice.sas | Creates a JobExecution web service if it doesn't already exist |
mv_deletefoldermember.sas | Deletes an item in a Viya folder |
mv_deletejes.sas | Deletes a Viya Job, if it exists |
mv_deleteviyafolder.sas | Creates a viya folder if that folder does not already exist |
mv_getaccesstoken.sas | Deprecated - replaced by mv_tokenrefresh.sas |
mv_getapptoken.sas | Deprecated - replaced by mv_registerclient.sas |
mv_getclients.sas | Get a list of Viya Clients |
mv_getfoldermembers.sas | Gets a list of folders (and ids) for a given root |
mv_getgroupmembers.sas | Creates a dataset with a list of group members |
mv_getgroups.sas | Creates a dataset with a list of viya groups |
mv_getjobcode.sas | Extract the source code from a SAS Viya Job |
mv_getjobstate.sas | Extract the status from a running SAS Viya job |
mv_getrefreshtoken.sas | Deprecated - replaced by mv_tokenauth.sas |
mv_getusergroups.sas | Creates a dataset with a list of groups for a particular user |
mv_getusers.sas | Creates a dataset with a list of users |
mv_jobexecute.sas | Executes a SAS Viya Job |
mv_jobflow.sas | Execute a series of job flows |
mv_jobwaitfor.sas | Takes a dataset of running jobs and waits for ANY or ALL of them to complete |
mv_registerclient.sas | Register Client and Secret (admin task) |
mv_tokenauth.sas | Get initial Refresh and Access Tokens |
mv_tokenrefresh.sas | Get an additional access token using a refresh token |
mv_webout.sas | Send data to/from the SAS Viya Job Execution Service |