The GA Procedure |
This section lists the programming statements used to initialize the model, code the objective function, and control the optimization process in the GA procedure. It documents the differences between programming statements in the GA procedure and programmming statements in the DATA step. The syntax of programming statements used in PROC GA is identical to that of programming statements used in the FCMP procedure.
Most of the programming statements that can be used in the SAS DATA step can also be used in the GA procedure. See the SAS Language Reference: Dictionary or BASE SAS documentation for a description of the SAS programming statements.
variable = expression; |
variable + expression; |
arrayvar[subscript] = expression; |
ABORT; |
CALL subroutine < ( parameter-1 <, ...parameter-n > ) >; |
DELETE; |
DO program-statements; END; |
DO variable = expression TO expression <BY expression>; |
program-statements; END; |
DO WHILE expression ; |
program-statements; END; |
DO UNTIL expression ; |
program-statements; END; |
GOTO statement_label ; |
IF expression THEN program-statement; |
<ELSE program-statement>; |
PUT < variable(s)> <@ | @@> ; |
RETURN <(expression)>; |
SELECT <(select-expression)>; |
WHEN-1 (expression-1 <...,expression-n>)program-statement ; |
<WHEN-n (expression-1 <...,expression-n>)program-statement ;> |
<OTHERWISE program-statement ;> |
STOP; |
SUBSTR( variable, index, length ) = expression; |
For the most part, the SAS programming statements work as they do in the SAS DATA step as documented in the SAS Language Reference: Dictionary. However, there are several differences that should be noted.
do i = 1,2,3;
is supported; however,
do i = 'A','B','C';
is not.
SELECT; | |
WHEN ( exp1 ) | stmt1; |
stmt2; | |
WHEN ( exp2 ) | stmt3; |
stmt4; | |
END; |
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.