Posts

SAS sample programs

SAS sample code programs: Macro for sorting the variables: How to convert character date values into numeric date values using DATASTEP/PROC SQL and ARRAYS: How to detect missing values using Arrays: First. & Last. Variables: How to determine the last observation in the dataset: How to determine whether a numeric or character value exists within a group of variables: Lag Function: How to obtain information from the previous observation: How to create a new dataset from multiple datasets based on the sorted order: Dynamically generate SET statement to combine multiple datasets: How to determine which dataset contributed an observation: How to determine if a variable exists in a dataset or not: How to Read Delimited Text Files into SAS: How to keep only even number observations in the dataset: How to verify the existence of an external file: Accurately calculating age in one line code: How to use INDEX/INDEXC functions: Finding the number of observations in the dataset: How to capita...

BASE SAS CERTIFICATION SUMMARY FUNCTIONS

Certification Summary---Functions: sourec: http://wiki.binghamton.edu/index.php/Certification_Summary---Functions SAS Functions can be used to convert data and to manipulate the values of character variables. Functions are written by specifying the function name, then it's arguments in parentheses. Arguments can include variables, constants, or expressions. Although arguments are typically separated by commas, they can also be specified as variable lists or arrays. Contents[ hide ] 1 YEAR, QTR, MONTH and DAY Functions 2 WEEKDAY Function 3 MDY Function 4 DATE and TODAY Function 5 SUBSTR Function 6 INDEX Function 7 UPCASE Function 8 LOWCASE Function 9 INT Function 10 ROUND Function 11 TRIM Function 12 Some Sample Certification Examples 13 Points to remember SAS Tip: How to round the numbers: It's often a requirement to round the values of one variable to a precision defined in a different variable - either another data set variable, or a macro ...