SAS Tips and Tricks

Demystify the Program Data Vector

Reading flat files in SAS Data Step gives you a lot of flexibility in terms of data quality and data manipulation. However, problem may arise when files are huge with poor data quality. In this tips and tricks we will have a look to the 'heart' of the Data Step manipulation and learn to do as much as we can do in this important step: applying data quality rules, creating error datasets, selecting good variables and records (etc.)

Details

The Program Data Vector (PDV) is the heart of the SAS Data Step processing. In this tips and tricks, you will learn what is the PDV and how you can take advantage of it in order to optimize your SAS Data Step code and understand your log better.
More precisely, we will answer the following questions:

What is the Program Data Vector?

  • When is it created, where is it stored, how could I see it?
  • Using Keep and Drop to select variables
  • Using subsetting if and where statement to select records
  • Resetting PDV variables to missing
  • Retaining variable values through Data Step iteration
  • Understanding the default PDV variables _N_ and _ERROR_

How could I make sure the data loaded have good quality?
  • Count number of records having bad pattern VS the one having good pattern
  • Create a separate dataset to store bad data for further investigation
  • Generate an Email or stop the current process when some event are triggered.

In the summary a concrete exercise of Data Quality will be done : creating in one shot a valid and an error dataset when reading poor quality data.

Prerequisites

You are a SAS beginner or used SAS long time ago in the past and would like to refresh your skills.

Quick Facts

  • Scheduled date: 2019-09-26 from 2 pm to 5 pm
  • Duration :3 Hours
  • Fee :240 Euros (VAT Exclusive)
  • Language: French/English
  • Included: Coffees, tips and tricks material

Christophe Kabacinski

click here to get more information about this teacher.

Course Location

This course will be organized at : Lodge.co Boulevard Simon Bolivar 34 1000 Bruxelles


Go back to your selection