O'Reilly logo

The DS2 Procedure: SAS Programming Methods at Work by Peter Eberhardt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7: An Example

Problem

The Hash Package

Four Steps to Creation

Lookup and Retrieval

Problem Revisited

Threaded Read

Parameterized Threaded Read

Problem

Suppose that the company is going to institute a new sales commission plan for its sales reps. Commission will be based on product category and month-to-date sales by the rep. You have to provide the costs of the new plan based on one month’s transactions. You might write out the problem as follows:

For each transaction, you need the following information:

•   Get the current month-to-date sales for the rep.

•   Determine the appropriate commission factor.

•   Calculate the commission for this transaction.

•   Update the rep’s month-to-date sales.

You write a skeleton DS2 program to implement: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required