Generated from C.65.00 /SYSADMIN/PUB/MYCICAT last modified on Sun Aug 29 15:08:37 2004
Back to Main Index
Provides an alternate execution sequence within an IF statement.
expression Logical expression, consisting of operands and relational operators. The THEN keyword is optional. It may be used or omitted and has no effect on the results. Refer to the IF command for a list of the operators that may be incorporated into an expression.
The ELSEIF command is used only in conjunction with the IF command and provides a means to avoid nested IFs. Any number of ELSEIFs may follow an IF command. In contrast, only one ELSE may follow an IF or ELSEIF. For more information, refer to the ELSE and IF commands. o To see a list of expression evaluator functions, type FUNCTIONS at the HELP prompt. Or, you may enter an individual function name for more specific information. o To see a list of FINFO options, type FINFO at the HELP prompt. o To see a list of predefined MPE/iX variables, type VARIABLES at the HELP prompt. Or, you may enter an individual variable name for more specific information. This command may be issued from a session, job, program, or in BREAK. Pressing [Break] terminates the INPUT() function.
The following example illustrates ELSE with the IF command IF EXPN1 THEN ... ELSE IF EXPN2 THEN ... ELSE IF EXPN3 THEN ... ELSE ... ENDIF ENDIF ENDIF The same result can be accomplished more economically by using ELSEIF with the IF command IF EXPN1 THEN ... ELSEIF EXPN2 THEN ... ELSEIF EXPN3 THEN ... ELSE ... ENDIF
Commands: CALC, DELETEVAR, ELSE, ENDIF, IF, SETJCW, SETVAR, SHOWJCW; see also FUNCTIONS and VARIABLES Back to Main Index