Finding the Max Value In An Array

This post was kindly contributed by Data Steps - go there to comment and to read the full post.

The max() function makes it easy to find the maximum value in a SAS array. Given an array like:array x[*] x1-x10;maxValue = max(of x[*]);Pretty slick, eh? Remember, it doesn’t return the position of the max element, just the max value.This can be pretty useful if you want to find out if at least one element of an array has a value. Like if you have an array of answers and you want to find out

This post was kindly contributed by Data Steps - go there to comment and to read the full post.