Skip to content

Latest commit

History

140 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

macros

SAS Utility Macros

A collection of SAS macros of general utility that enhance or extend the SAS macro language.

Macros that return no code at all

benchdblibchkfread(mode=2)macdeletenobs(mvar supplied)parmvsyslput612

Macros that return string

catxcompblcurdirdirexistdquotefilereffreadlowcasemissingmvartestnobsnvalidparsemqcatxqcompblqlistqlowcaseqsubtrnqsysgetsquotesubstrnsymgettdexistvarexistvarinfoxpttype

Macros that return SAS statements

Macros that return SAS steps

cfmtgencontentscontentvcsv2dscsvfiledbcondirtreeds2postdslistgithub_includemaclistreplace_crlfsafe_ds2csvsas2xportsubnetxport2sas

Alphabetical List - With descriptions

  • bench - Time interval between calls
  • catx - Replicate the SAS function CATX() in macro code
  • cfmtgen - Generate format library with code values included in decodes.
  • compbl - Replicate the SAS function COMPBL() in macro code
  • contents - Use data step and function calls to gather contents information on a dataset
  • contentv - Creates VIEW or DATASET containing the data file column attributes
  • csv2ds - Convert a delimited text file into a SAS dataset
  • csvfile - Write SAS dataset as CSV file
  • curdir - Returns (optionally changes) the current working directory physical name
  • dbcon - Summarize the contents of a dataset
  • dblibchk - Return DBTYPE, DBHOST and DBNAME for an existing SAS/Access library
  • direxist - Test if directory exists
  • dirtree - Build dataset of files in directory tree(s)
  • dquote - Quote string with double quote characters
  • ds2post - Generate data step suitable for on-line posting to create an existing dataset
  • dslist - Generate dataset list to summarize SAS datasets in libraries
  • fileref - Verify whether a fileref has been assigned
  • fread - Reads file using only macro code
  • github_include - Run SAS code from github repository
  • lowcase - Replacement for SAS supplied LOWCASE macro that eliminates errors
  • macdelete - Remove compiled macros using %SYSMACDELETE macro statement
  • maclist - Generate list of compiled macros and their source directories
  • missing - Return current MISSING statement settings
  • mvartest - Test for the existence of a macro variable with optional scope limitation
  • nobs - Return the number of observations in a dataset reference
  • nvalid - A function style macro that extends the NVALID() SAS function
  • parmv - Parameter validation with standard error message generation
  • parsem - Macro tool for parsing a macro variable text string
  • qcatx - Mimic CATX() function as a macro function. Return results with macro quoting
  • qcompbl - Compress multiple spaces into one, return value with macro quoting
  • qlist - Adds quotes to each word in a list
  • qlowcase - Convert to lowercase, return results macro quoted
  • qsubtrn - Subset string (simulation of SUBSTRN function), return results macro quoted
  • qsysget - Get macro quoted value of enviroment variable
  • replace_crlf - Replace carriage return or linefeed characters that are inside quotes
  • safe_ds2csv - Write SAS dataset as CSV file insuring proper quoting
  • sas2xport - Generate SAS V5 or V9 Transport file from SAS datasets/views
  • squote - Quote string with single quote characters
  • subnet - Build connected subnets from pairs of nodes
  • substrn - Subset string (simulation of SUBSTRN function)
  • symget - Get value for macro variable that is hidden by local macro variable
  • syslput612 - Copy of old SAS 6.12 autocall macro %SYSLPUT()
  • tdexist - Return type of a teradata table or view to test if it exists
  • varexist - Check for the existence of a specified variable
  • varinfo - Return information for a variable
  • xport2sas - Convert SAS XPORT file to SAS dataset(s)
  • xpttype - Check file to see what type of transport file it is

About

SAS Utility Macros

Resources

Stars

27 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages