
Master SAS fundamentals by solving certificate-style questions to build exam confidence. Learn data step concepts, reading and writing data, ODS reporting, proc means and proc freq, plus macros for skills.
You will learn where to find and download SAS and WPS with different versions, installation and set share folder, SAS library and initial environment
You will learn my teaching steps and download PDF file for self review and study
Set up the SAS library and its current folder, then create a sales table. Include name, gender, and age; identify results when the program runs.
Learn how SAS represents data types and missing values in data sets, using a library and sales data example, including numeric missing values and blanks for character variables.
Learn to use the set statement with firstobs and obs to extract the tail from 100 records, and apply _n_ and logical operators (gt, ge, lt, le) to select 71–100.
Explore using if statements in SAS to restrict or subset data sets, determine the play variable from multiple conditions, and apply the if-else loop structure.
This SAS lecture demonstrates using a do loop to compute yearly total fund return at 10 percent and shows that without an output statement you only obtain the last year.
Learn how to reset the page number to 1 for a SAS report by choosing the correct option before a proc print or proc freq.
Learn how to read a flat file in SAS, assign positions with the input statement, and apply the dollar ten point two format to display price values as you want.
This SAS training teaches how to use position input in the data step to read from the third to the thirtieth position, using 3-30, with practical validation.
Learn to input data in SAS using infile data lines with the DSD option to handle missing values, and set field widths with a length statement for long variable names.
Use the filename statement in SAS for data input and output, create file name aliases, and read space-delimited data with book name and price.
Learn how renaming a variable in a SAS data step changes subsequent operations and why referencing the correct name matters for applying a 10 percent increase.
Explore SAS input techniques for reading raw data with infile, handling missing values, and using length, informats, and formats to convert strings into dates for certificate question review.
Discover conditional data reading in SAS by using a single trading symbol to hold the line, then apply substring to check the name and read cabin and address.
Learn to read multi-line data with double trailing marks in this SAS training lecture, conditionally read fields by identity, and parse teacher and student answers.
Master SAS data step logic with the in operator and if-then statements, read raw data using the double trailing mark, and filter or delete records to build the cars dataset.
Learn how to use the output and merge statements in SAS by combining datasets A, B, C, and D by ID, resulting in a final dataset of six records.
Learn how to use the SAS set statement with in= flags and an if condition to control merged data without a by key, and why zero indicators yield no records.
In SAS, sort dataset B by descending id, then merge datasets A, B, and D by id, and ensure by-variables are consistently sorted to avoid errors.
Explore relational merging of data sets by name, showing how B overwrites A and how union merges determine final results.
Learn how to sort data with proc sort, apply the nodupkey option to remove duplicates, and manage the output dataset using the out= option.
Explore how ranuni() generates uniform random numbers to split a 100-record SAS data set into three datasets D1, D2, D3 using a seed for reproducible sampling and understanding 70/30-like allocations.
Learn how the SAS set statement stacks datasets A and B to five observations. See how using set statements yields two observations with values overwritten by the second dataset.
Demonstrates how to merge two datasets in a single data step, aligning each student with its teacher using a left join, and avoiding stacking.
Explore SAS date types, format display with date9, and convert numeric dates to strings using the put function, including creating new variables to change data types.
Learn how to generate a SAS dataset of all dates from December 28, 2014 to January 28, 2015 using a do loop, date constants, and a format statement for display.
explore how to generate a SAS date from integers, apply d-y format, and convert between numeric and character using input, put, and concatenation.
Explore a SAS program that uses a do loop to generate 21 records with sequence and list_dates, applying CO and PDL to concatenate values into a character stream with spaces.
Use weekday() to return an integer from 1 to 7, with Sunday as 1. Verify that the caption shows Thursday as 5 and Tuesday as 2.
Master reading dates and missing values in SAS using informats. Use DSD to separate columns and treat consecutive commas as missing.
Read external data with infile, compute the mean of grade1 and grade2, and save the results to a file; learn how missing values influence the mean and final results.
Explore SAS data steps using a virtual dataset, put and infile statements, and the DST option to read and write a text file with id and age.
Analyze how test variable expressions and logical expressions determine binary indicators in SAS data steps, as dataset A shows how age values affect x across records.
Use proc contents to generate a data dictionary with variable names, data types, and labels, and write it to a table in the work library via the out= option.
Learn to use proc contents to extract all data structures from every dataset in a library and output the data dictionary to a SAS table with the directory option.
Learn statements and options in proc datasets to manage data, compare with proc contents, and display dataset variables in FCB order according to the data dictionary.
Understand how proc flist reads external data without creating a SAS dataset, enabling reading text files inside SAS to save space.
Use the kill statement in proc datasets to delete all datasets in a specified library, such as your work library or a permanent library, for efficient cleanup of temporary data.
Learn SAS data transformation using an array to replace zeros, representing missing values, with nine across transaction 1 to 100 variables. Use a do loop to apply the change efficiently.
Learn how SAS arrays cover item1 to item18, use star for flexible dimensions, and apply do loops and the dim function to count elements in the inventory dataset.
Learn to extract all numeric variables into an array and replace missing values with zero using a do loop, enabling efficient data cleaning in SAS inventory datasets.
Transform a data set with the data step by using arrays and nested loops to produce a four-record output with name and value columns.
Use arrays and a do loop in a SAS data step to compute a weighted average price from three daily prices, using corresponding weights, producing an average price per stock.
Understand how SAS arrays in the data step reference multiple variables with a single name, and use subscripts to loop through the dataset's variables.
SAS proc sort sorts by price descending and discount ascending, using nodupkey to ensure uniqueness by the by variables, with an out= dataset to preserve the original data.
Learn to compute per-employee cumulative sales and transaction counts in a SAS data step using by employee ID, retain, and proper output to preserve all records.
SAS training explains using a do loop from 1 to 12 to compute total return with 10 percent interest, and using return statements to control output and stop conditions.
Learn to read income as character, convert with the input function, and apply _error_ handling to safely compute total_income with a new income plus tax column.
Ensure both datasets share the same sort order on the merge key, here ID (and name for the second dataset); otherwise the merge fails as SAS uses ascending by default.
In a SAS data step, iterate year 1 to 50, compute values with the round function, set decimals by the second argument, and generate 50 records.
Learn to handle missing values in SAS by using the mean function, define a logical flag as a comparison result, and build and test dataset x.
Learn how to compute the year-over-year percentage increase in SAS using lag and dif to compare current and previous values. Use max to keep results nonnegative and avoid retain pitfalls.
Explore how SAS formats a date value, its relationship with strings, and how concatenation affects stream variables, including when values appear missing or convert to strings.
Learn to use proc format to create a user defined format. Map scores: below 60 failed, 60–80 pass, 80–90 good, 90–100 excellent, above 100 wrong score; formats only affect display.
Compute mean, min, and max of h by a five-category mark using proc means with a class variable and a user defined format, yielding six rows and seven columns.
Compare proc means results using by versus class statements in SAS, noting the need for proc sort with by; five records for by, seven for class, with min and max.
Explore how by and class statements influence proc means, producing group means for each category and contrasting subgroup statistics with the whole sample.
Discover how to invoke the data step debug option in SAS, and use it to monitor where an error occurs in the data step.
Learn to convert a character string into a SAS date using input and the date9. format. Explore using substr and mdy to construct and display the date.
Understand how the SAS macro variable _error_ acts as a binary indicator (0 or 1) for data step errors and enables conditional flow control.
Learn how to define a SAS library using a libname statement, mapping a library to a folder on Windows or Linux. Distinguish between the current library and a named library.
Learn to read position-based SAS data from raw lines using infile, an input statement, and modifiers to handle spaces, apply date9. format, and display id, birthdate, and name.
Understand how firstobs and obs options control output in SAS data step and procedures, and learn why only where statements, not if or iif, should filter results in procedures.
Explore how to use firstobs and obs options in SAS to control which observations PROC PRINT displays, using a data step to create a 100-record dataset and a where filter.
Learn how to read raw data into a SAS table from external files using the infile statement and the DSD option to handle quoted fields and comma delimiters.
Explore the _n_ automatic variable and if..else logic in a SAS do loop from 1 to 10 within a single data step, determining the final amount in the last observation.
Learn how a user defined format created with proc format acts as a lookup table and is stored in the work library dictionary dataset, and how to display values.
Master do while and break condition in SAS by tracing a loop starting at 3, adding 10 per iteration under an or condition, ending with 83 and one output record.
Learn to use the label statement in a SAS data step to rename variable labels by referencing the variable names, and modify the dataset with set rather than proc print.
Apply cat() and catx() to concatenate first and last names with a single space, and compare space handling with capx and the compress options to preserve formatting.
Learn to locate a substring inside a SAS string using the find function and extract it with substring, illustrating how to obtain 'book' from text.
Split dataset c into a and b using a do loop and conditional output, yielding six records in a and five in b, each containing one variable.
Analyze how an array defines 12 elements, loops through them, and creates one output record while some variables remain missing in the resulting dataset.
Showcases an array-driven SAS solution to compute a new mean variable across twelve Ammie variables (Ammie1–Ammie12), by ignoring missing values, revealing how many missing values remain per row.
Demonstrates using an array in a data step to create and populate two character variables from a comma-delimited file, and highlights proper array definition and assignment to avoid syntax errors.
Explore understanding logical conditions in if statements in SAS, using age-based grouping and equivalence checks, while recognizing syntax errors and evaluating functionally equivalent answers.
Learn how to apply multiple filters in SAS using two if statements to select observations by gender and age, including handling missing values.
Explains how SAS reads a string with a date format into a numeric value and why a variable's data type cannot be changed by the length statement, with concatenation examples.
Learn universal string matching in SAS by using where and like with percent signs to extract all rows whose job titles contain manager.
Apply proc means with a class statement to compute the average income by non-missing department and the grand total, ignoring missing department values by default, and output the results.
Learn how to use proc means with by statement to compute department-level average income, including missing values, and ensure proper sorting, while avoiding class statements.
Apply proc freq in SAS to analyze age group by gender and report only row percentages, suppressing frequency and other percentages to show each age group's gender mix.
Learn to create a two-way frequency cross tab in SAS and output row, column, and total percentages to a dataset using proc freq with out and outpct options.
Define user defined formats with proc format to map 1–3 to disagree and 4–5 to I agree, then apply the format in proc report and see how 3.5 is displayed.
Apply SAS ODS to send data and graphics to special destinations like pdf or pda, and understand how closing the ODS destination finalizes the output.
Learn to generate a resulting table using iif and if statements to assign building values by gender, and how a variable’s length is fixed at initialization.
Understand how to use if...then...else and if...then...do in SAS, including when to pair do with end to run multiple statements, and how to avoid syntax errors.
Learn how missing semicolons trigger SAS data step errors, diagnose log messages, and fix set statements across tables by adding semicolons to end statements.
Understand how SAS input statements use single and double trailing marks to read across lines in a single data step, and how this affects fields read and dataset records.
Demonstrate data type conversion in SAS using the put() function to convert 99 to a character; show automatic string-to-number conversion in arithmetic yields 86 in the output dataset.
Examine how the data step converts the amount when a string is used, showing that a string like ninety-nine cannot be subtracted from a number, producing a missing value.
Learn how to keep and drop variables in a SAS data step using explicit variable names rather than array expressions, including retaining id and players 13–15.
Learn how the single trailing mark in SAS input statements holds a line and conditionally reads subsequent fields, producing 25 observations with 20 lower and 5 upper.
Learn to transpose store transactions into a wide table using an array and retain to compute cumulative spend by store, after sorting by store and creating visit time columns.
Explain the difference between data error and syntax error in SAS, showing how a data step continues after errors like division by zero or missing values in the SAS log.
Master how to use firstobs and obs in SAS procedures, illustrated with proc print and proc means, to set a starting point and last record for selective observations.
Apply composite functions in a SAS data step to compute a 0/1 score from birth dates using today and abs, and understand SAS boolean values.
Master the eof option in SAS data step to detect end-of-file and write the last observations to the output dataset.
Split a single column into a date field by extracting birthday with substring from position 26, reading it with input using a date format, then calculating age with intck.
Apply proc means with a class statement to generate department-wise min, max, mean, and median for income, tax, and age, and output to the SAS window and a data set.
Understand how SAS variables are listed by their definition order rather than reading order, and learn to set lengths to prevent truncation when importing data with formats like date9.
Learn to merge two SAS tables by item_id with a left join, keeping only transaction records and using an indicator to guide the data step merge.
If you need a comprehensive SAS course that helps you
1) pass SAS certificate exam;
2) master SAS programming by solving 101 questions;
3) understand how SAS codes are working;
4) walk through each question by patient interpretation ;
5) practice and review SAS examples by yourself using my handout;
6) extend SAS knowledge and skills beyond these 101 questions
Then this course is right for you. I am using a special but effective teaching method in this course. You are not just leaning SAS knowledge and skills, but also examining yourself by solving each question! You are not just seeking the correct solution, but also figuring out why other answers are incorrect.
I will show you both theories in slides and code implementation in programming interface. With the questions, multiple choices, code interpretation, examples and data sets I provided, you will be able to start SAS programming efficiently and confidently pass certificate exam!