SAS Base Programming study materials
SAS Base Programming study resources

SAS Base Programming study plan

SAS Base Programming · Give each week a clear focus.

8 weeks · About 8 hours per week

Week 1

Access and create data structures

  • Assign and clear LIBNAME references to create a permanent library alongside WORK

  • Write DATA step code with DATALINES to construct three new datasets by hand

  • Read an external delimited file with PROC IMPORT and inspect its descriptor portion using PROC CONTENTS

  • Build a dataset from two source tables using a DATA step SET statement with a subsetting IF

Your checkpoint

A single runnable program that creates three datasets in a permanent library, plus printed PROC CONTENTS output for each, with a clean log containing zero ERROR or WARNING lines.

Week 2

Access and create data structures & Manage data

  • Read raw flat files using INFILE with informats, column pointers, and a mix of numeric and character INPUT specifications

  • Combine datasets vertically with PROC APPEND and horizontally with a one-to-one MERGE

  • Create derived variables using IF-THEN/ELSE logic and assignment statements

  • Sort input data correctly before any BY-group merge or join step

Your checkpoint

A merged analysis dataset built from two raw text files, with a PROC PRINT of the first 10 observations and annotated log output showing no uninitialized-variable or BY-variable notes.

Week 3

Manage data

  • Subset observations using WHERE expressions, IF statements, and OBS/FIRSTOBS dataset options, and explain how they differ

  • Process arrays and DO loops to apply the same logic across a list of variables

  • Apply character, numeric, and date functions to clean and transform values

  • Remove duplicate records with PROC SORT using NODUPKEY and interpret the resulting NOTE

Your checkpoint

A 20-question timed self-test on DATA step mechanics, scored at 80% or higher, with every missed item rewritten as a corrected code snippet.

Week 4

Manage data

  • Reshape a wide dataset to long form with PROC TRANSPOSE and back again

  • Accumulate running totals using RETAIN and the SUM statement

  • Detect group boundaries with FIRST. and LAST. variables in a BY-group DATA step

  • Update a master dataset from a transaction dataset using a BY-variable MERGE with IN= flags

Your checkpoint

A full-length 60-question practice exam scored at 70% or higher, broken down by domain so the two weakest domains are named in writing.

Week 5

Manage data & Error handling

  • Control variable storage with LENGTH statements to prevent silent character truncation

  • Diagnose compile-time versus execution-time errors from their log position and wording

  • Repair ten deliberately broken programs and state the root cause of each failure

  • Verify expected row counts and missing-value patterns using PROC FREQ and PROC MEANS

Your checkpoint

A log-diagnosis worksheet covering 10 broken programs, each with the error class, root cause, and corrected code.

Week 6

Error handling

  • Trace and interpret automatic variables ERROR and N inside a DATA step

  • Write diagnostic messages to the log with PUT and PUTLOG during development

  • Distinguish NOTE, WARNING, and ERROR severities and decide which must block a production run

  • Handle missing and invalid values explicitly with conditionals rather than letting them propagate

Your checkpoint

A 15-item error-handling quiz scored at 80% or higher, plus a one-page checklist of log messages you will scan for before submitting any program.

Week 7

Generate reports and output

  • Route procedure output to HTML and PDF destinations with the ODS statement, including closing destinations properly

  • Summarize and present data with PROC PRINT, PROC REPORT, PROC MEANS, and PROC FREQ

  • Apply labels, titles, footnotes, and system date functions to report output

  • Create and apply user-defined formats with PROC FORMAT to group and label values

Your checkpoint

A multi-page PDF report containing at least one listing, one summary table, and one frequency table, generated entirely by one program with ODS destinations properly opened and closed.

Week 8

Access and create data structures & Manage data & Error handling & Generate reports and output

  • Complete two full timed mock exams under exam conditions without referencing notes

  • Re-drill the two lowest-scoring domains from each mock until accuracy exceeds 85%

  • Recite from memory the practical difference between WHERE and IF, and between SET and MERGE

  • Review every wrong answer and rewrite it as a working code snippet

Your checkpoint

Two completed mock exams with a written score log showing the second attempt at least 10 percentage points above the first.

Milestones

Week 2: You can create a permanent library, import a raw file, and merge two datasets from memory without consulting documentation.

Week 4: Cumulative practice exam score of 70% or higher, with domain 2 accuracy at or above 65% and no domain below 50%.

Week 6: You can read a SAS log containing three planted errors and correctly classify and fix each one in under five minutes total.

Week 8: Two consecutive timed mocks at 80% or higher overall, with no individual domain below 70%.