Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

Defining and Referencing One-Dimensional Arrays

A Brief Overview

Suppose you have a table that contains patient names and five health indicators for each patient. You want to keep a running total of the count of high values for each patient. You can do this by using five IF-THEN statements or DO-loops. The only syntax that differs in each statement is the name of the health indicator column. However, this creates a program that contains repetitive code and is less efficient. Suppose your data set had fifty health indicators instead of five. With fifty indicators, you would need fifty assignment statements. Instead of writing repetitive code, you can use an array.
A SAS array provides a way to reference a group of columns for processing in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692