The OPTMODEL Procedure

Programming Statements

PROC OPTMODEL supports several programming statements. You can perform various actions with these statements, such as reading or writing data sets, setting parameter values, generating text output, or invoking a solver.

Statements are read from the input and are executed immediately when complete. Note that certain statements can contain one or more substatements. The execution of substatements is held until the statements that contain them are submitted. Parameter values that are used by expressions in programming statements are resolved when the statement is executed. Note that this resolution might cause errors to be detected. For example, the use of undefined parameters is detected during resolution of the symbolic expressions from declarations.

A statement is terminated by a semicolon. The positions at which semicolons are placed are shown explicitly in the following statement syntax descriptions.

The programming statements can be grouped into these categories:

Control Looping General Input/Output Model
DOCONTINUEAssignmentCLOSEFILEDROP
IFFORCALLCREATE DATAEXPAND
Null (;)DO IterativeRESET OPTIONSFILEFIX
STOPDO UNTIL PRINTRESTORE
 DO WHILE PUTSOLVE
 LEAVE READ DATAUNFIX
   SAVE MPS 
   SAVE QPS 


Assignment Statement

CALL Statement

CLOSEFILE Statement

CONTINUE Statement

CREATE DATA Statement

DO Statement

DO Statement, Iterative

DO UNTIL Statement

DO WHILE Statement

DROP Statement

EXPAND Statement

FILE Statement

FIX Statement

FOR Statement

IF Statement

LEAVE Statement

Null Statement

PRINT Statement

PUT Statement

READ DATA Statement

RESET OPTIONS Statement

RESTORE Statement

SAVE MPS Statement

SAVE QPS Statement

SOLVE Statement

STOP Statement

UNFIX Statement

Previous Page | Next Page | Top of Page