% LOOKUP &declarepart oper searchval [FROM value [valueN ...]] statementblock [% ELSE-IF condition statementblock . . . [% ELSE statementblock [% END]
&declarepart | Name of variable assignment in % DECLARE table. |
condition | Condition can be a number or variable, followed by a space and a relational operator, followed by a space and a
value. To specify multiple conditions, use the Boolean operators AND or OR with no parentheses.
Relational operator can be =, NOT =, <, >, NOT <, NOT >, <=, >=. Value can be a number, a literal enclosed in apostrophes or quotation marks, or a variable. |
oper | Valid operators =, NOT =, <, >, NOT <, NOT >, <=, >=. |
searchval | Customizer term. |
value | Starting value(s) of the low-order &subscript of the &fieldname associated with the &declarepart. Can be a constant, variable, or expression. |
Reference a % DECLARE table.
% DECLARE &IMS-PCB-(&PCBX)-SEG-(&SEGX) % &IMS-PCB-SEG-NAME X30 % &IMS-PCB-SEG-IMSNAME X8 % &IMS-PCB-SEG-PROCOPTS % &IMS-PCB-SEG-PROCOPT-GET N % &IMS-PCB-SEG-PROCOPT-ISRT N % &IMS-PCB-SEG-PROCOPT-REPL N % &IMS-PCB-SEG-PROCOPT-DLET N % &IMS-PCB-SEG-LEN N6 . . % LOOKUP &IMS-PCB-SEG-NAME = &THE-SEG-NAME-YOU-WANT FROM 1 1 do this if found . . % ELSE do this if found . . .
Address &declareparts of other % DECLARE structures that use some or all of the same &subscripts without an additional % LOOKUP. Strip blanks from &ALIAS before the % LOOKUP by parsing it with the function &PARSE.
% DECLARE &VS-(&VSX-FILE)-KEY-(&VSX-KEY)-B % &VSP-FILE-KEY-VOL X8 % &VSP-FILE-KEY-SPACE X20 % &VSP-FILE-KEY-CICZ X20 % DECLARE &VS-(&VSX-FILE)-KEY-(&VSX-KEY)-ALIAS-(&VSX-ALIAS) % &VSP-FILE-KEY-ALIAS X30 . . . &ALIAS = &PARSE(&ALIAS) . . . % LOOKUP &VSP-FILE-KEY-ALIAS = &ALIAS FROM 1 1 1 % &VOL = &VSP-FILE-KEY-VOL
Comments: