The OPTLSO Procedure

The FCMP Procedure

The FCMP procedure is part of Base SAS software and is the primary mechanism in SAS for creating user-defined functions to be used in a DATA step and many SAS procedures. You can use most of the SAS programming statements and SAS functions that you can use in a DATA step to define FCMP functions and subroutines. The OPTLSO procedure also uses PROC FCMP to provide a general gateway for you to describe objective and constraint functions. For more information, see the sections Describing the Objective Function and Describing Nonlinear Constraints), respectively.

However, there are a few differences between the capabilities of the DATA step and the FCMP procedure. For more information, see the documentation about the FCMP procedure in Base SAS Procedures Guide. Further, not all PROC FCMP functionality is currently compatible with PROC OPTLSO; in particular, the following FCMP functions are not supported and should not be called within your FCMP function definitions: WRITE_ARRAY, RUN_MACRO, and RUN_SASFILE. The READ_ARRAY function is supported; however, the corresponding data sets that are used must be listed in a separate statement of PROC OPTLSO (see the section READARRAY Statement and the second program in Using External Data Sets). After you define your objective and constraint functions, you must specify the libraries by using the CMPLIB= system option in the OPTIONS statement. For more information about the OPTIONS statement, see SAS Statements: Reference. For more information about the CMPLIB= system option, see SAS System Options: Reference.