Hello Jeff,
OPTMODEL and the especially the read statement are very powerful tools, unfortunately that goes hand in hand with being not so easy to understand.
First of all, OPTMODEL is an algebraic modeling language, so it creates a mathematical model of an optimization problem and then fill this model with data to create an optimization problem instance. That is a different approach from other SAS procs because modeling in OR is different from modeling in statistics.
I am not sure if all the code you wanted to paste into the forum showed up, the forum has a problem with the "less than or equal" character combination. But the two read statement that show up here (in their full length from the documentation) mean something like this:
1. read the data from the dataset dmnd, store the values of the data set column loc in the set LOC. Then for each of these values in LOC and for each element d in the set DOW, fill the parameter array demand with the according data from the data set.
2. Here machine and customer are variables in the data set that we use to when reading the data, we do not store it in a set as with did with loc in the previous example. It means something like: read machine and customer, then for each j in GRADES, store the data from the appropriate column in the parameter array return. Return is a three dimensional array, so it stores a value for each combination of machine, customer and j.
I hope this helps.
Philipp
... View more