Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
base Directory Reference

Regular Base SAS Macros.

More...

Files

file  mf_abort.sas [code]
 abort gracefully according to context
 
file  mf_existds.sas [code]
 Checks whether a dataset OR a view exists.
 
file  mf_existfeature.sas [code]
 Checks whether a feature exists.
 
file  mf_existvar.sas [code]
 Checks if a variable exists in a data set.
 
file  mf_existvarlist.sas [code]
 Checks if a set of variables ALL exist in a data set.
 
file  mf_getattrc.sas [code]
 Returns a character attribute of a dataset.
 
file  mf_getattrn.sas [code]
 Returns a numeric attribute of a dataset.
 
file  mf_getengine.sas [code]
 Returns the engine type of a SAS library.
 
file  mf_getfilesize.sas [code]
 Returns the size of a file in bytes.
 
file  mf_getkeyvalue.sas [code]
 retrieves a key value pair from a control dataset
 
file  mf_getplatform.sas [code]
 Returns platform specific variables.
 
file  mf_getquotedstr.sas [code]
 Adds custom quotes / delimiters to a delimited string.
 
file  mf_getschema.sas [code]
 Returns the database schema of a SAS library.
 
file  mf_getuniquefileref.sas [code]
 Assigns and returns an unused fileref.
 
file  mf_getuniquelibref.sas [code]
 Returns an unused libref.
 
file  mf_getuniquename.sas [code]
 Returns a shortened (32 char) GUID as a valid SAS name.
 
file  mf_getuser.sas [code]
 Returns a userid according to session context.
 
file  mf_getvalue.sas [code]
 Retrieves a value from a dataset. If no filter supplied, then first record is used.
 
file  mf_getvarcount.sas [code]
 Returns number of variables in a dataset.
 
file  mf_getvarformat.sas [code]
 Returns the format of a variable.
 
file  mf_getvarlen.sas [code]
 Returns the length of a variable.
 
file  mf_getvarlist.sas [code]
 Returns dataset variable list direct from header.
 
file  mf_getvarnum.sas [code]
 Returns the position of a variable in dataset (varnum attribute).
 
file  mf_getvartype.sas [code]
 Returns variable type - Character (C) or Numeric (N)
 
file  mf_isblank.sas [code]
 Checks whether a macro variable is empty (blank)
 
file  mf_loc.sas [code]
 Returns physical location of various SAS items.
 
file  mf_mkdir.sas [code]
 Creates a directory, including any intermediate directories.
 
file  mf_mval.sas [code]
 Returns a macro variable value if the variable exists.
 
file  mf_nobs.sas [code]
 Returns number of logical (undeleted) observations.
 
file  mf_trimstr.sas [code]
 Removes character(s) from the end, if they exist.
 
file  mf_uid.sas [code]
 Creates a Unique ID based on system time in a friendly format.
 
file  mf_verifymacvars.sas [code]
 Checks if a set of macro variables exist / contain values.
 
file  mf_wordsinstr1butnotstr2.sas [code]
 Returns words that are in string 1 but not in string 2.
 
file  mp_abort.sas [code]
 abort gracefully according to context
 
file  mp_binarycopy.sas [code]
 Copy any file using binary input / output streams.
 
file  mp_cleancsv.sas [code]
 Fixes embedded cr / lf / crlf in CSV.
 
file  mp_createconstraints.sas [code]
 Creates constraints.
 
file  mp_createwebservice.sas [code]
 Create a web service in SAS 9 or Viya.
 
file  mp_deleteconstraints.sas [code]
 Delete constraionts.
 
file  mp_dirlist.sas [code]
 Returns all files and subdirectories within a specified parent.
 
file  mp_distinctfmtvalues.sas [code]
 Creates a dataset containing distinct formatted values.
 
file  mp_dropmembers.sas [code]
 Drops tables / views (if they exist) without warnings in the log.
 
file  mp_ds2cards.sas [code]
 Create a CARDS file from a SAS dataset.
 
file  mp_getconstraints.sas [code]
 Get constraint details at column level.
 
file  mp_getddl.sas [code]
 Extract DDL in various formats, by table or library.
 
file  mp_getmaxvarlengths.sas [code]
 Scans a dataset to find the max length of the variable values.
 
file  mp_guesspk.sas [code]
 Guess the primary key of a table.
 
file  mp_jsonout.sas [code]
 Writes JSON in SASjs format to a fileref.
 
file  mp_lib2cards.sas [code]
 Convert all library members to CARDS files.
 
file  mp_perflog.sas [code]
 Logs the time the macro was executed in a control dataset.
 
file  mp_recursivejoin.sas [code]
 Returns all children from a hierarchy table for a specified parent.
 
file  mp_resetoption.sas [code]
 Reset an option to original value.
 
file  mp_runddl.sas [code]
 An opinionated way to execute DDL files in SAS.
 
file  mp_searchcols.sas [code]
 Searches all columns in a library.
 
file  mp_searchdata.sas [code]
 Searches all data in a library.
 
file  mp_setkeyvalue.sas [code]
 Logs a key value pair a control dataset.
 
file  mp_stprequests.sas [code]
 Capture session start / finish times and request details.
 
file  mp_streamfile.sas [code]
 Streams a file to _webout according to content type.
 
file  mp_unzip.sas [code]
 Unzips a zip file.
 
file  mp_updatevarlength.sas [code]
 Change the length of a variable.
 
file  mp_zip.sas [code]
 Creates a zip file.
 

Detailed Description

These macros have the following attributes:

  OS independent
  Not metadata aware
  No X command
  Prefixes:  _mf_, _mp_