I was doing an environmental scan of mathematical programming languages that support a "modeler's form". This seems like a well recognized term coined by creators of AMPL, meaning that the data structures/objects are organized and named in a way that recognizably reflects the context of the problem domain. For SAS, I started in what I now think is in a tangential area, CASL, and found my way to SAS/OR, specifically OPTMODEL. However, I'm having trouble with the terminology used. OPTMODEL is referred to as a "procedure", with one way of designating it is "PROC OPTMODEL" [1,2]. But it is described as a modelling language plus solvers. Procedures are normally a component of languages rather than the other way around.
I found my way to the example code at pages [3,4]. If these are in fact examples of the modelling language associated with OPTMODEL, then it overlaps a lot with AMPL, which would make sense since they both model mathematical programming.
Why is OPTMODEL referred to as a "procedure"? It seems like an model interpreter. By "procedure", does SAS mean "workflow" or "process"?
P.S. I also found this explanation of SAS procedures: https://support.sas.com/learn/le/proc/index.html. It refers to "procedure statements" as a "PROC step". It doesn't really clea things up.
[1] https://support.sas.com/rnd/app/or/MP.html
[2] https://support.sas.com/rnd/app/or/procedures/optmodel.html
One of the first things to remember about SAS - it is NOT a programming language (although I suspect there are those in this community that would disagree). SAS is a useful set of tools that often look like a programming language - in particular the DATA step, which is effectively the only component of the SAS "language" that is not referred to as a procedure.
Procedures may be simple:
proc contents data=mylib.mydata;
run;
which reports on the metadata of a sas data set.
Probably the most frequently used non-simple procedure is PROC SQL, which facilitates most sql statements in managing data sets. I suppose in many programming contexts, SQL is not a procedure, but a language.
You've just run into PROC OPTMODEL which has a rich variety of components that look like a sub(?)-language.
SAS, if it is a language, is a procedural language - it does its work in a series of modules called by the programmer to ultimately facilitate data analysis. A step (either a data step or a proc step) is run, followed by another step, etc. until the multi-step program has come to an end. As a generality these procedures cannot call each other.
I leave it to the computer scientists among us to clarify my answer.
Thanks, Reeza. I'm just trying to interpret the language that describes OPTMODEL at this point.
At the moment, I suspect that an OPTMODEL procedure is actually the source code that describes a model using the modeling language, i.e., rather than the intepreter itself.
One of the first things to remember about SAS - it is NOT a programming language (although I suspect there are those in this community that would disagree). SAS is a useful set of tools that often look like a programming language - in particular the DATA step, which is effectively the only component of the SAS "language" that is not referred to as a procedure.
Procedures may be simple:
proc contents data=mylib.mydata;
run;
which reports on the metadata of a sas data set.
Probably the most frequently used non-simple procedure is PROC SQL, which facilitates most sql statements in managing data sets. I suppose in many programming contexts, SQL is not a procedure, but a language.
You've just run into PROC OPTMODEL which has a rich variety of components that look like a sub(?)-language.
SAS, if it is a language, is a procedural language - it does its work in a series of modules called by the programmer to ultimately facilitate data analysis. A step (either a data step or a proc step) is run, followed by another step, etc. until the multi-step program has come to an end. As a generality these procedures cannot call each other.
I leave it to the computer scientists among us to clarify my answer.
Look into Proc IML for even more similar confusion.
Thanks. It actually clears things up. Basically, very sophisticated tools are invoked as procedures from a higher level language. A bit like being in Bash and invoking LaTeX. But much more sophisticated.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.