% DECLARE
&fieldname(&subscript1)[...(&subscriptN)]
[% &declarepart1 [Xn|Nn|REDEFINES]
.
.
.
% &declarepartN [Xn|Nn|REDEFINES]]
[% END]
| &declarepart | Subscript-part of &fieldname. Indentation indicates subordination. Note the following.
|
| &fieldname | Name-assignment statement with zero or more subscripts and up to 78 &declareparts in each structure level. |
| &subscript | Set members of single- or multi-dimensional arrays. Values are numbers or strings (maximum 12 characters). For numeric values, the counter starts at 1 and increments until the end of the numeric value. There is no limit on the number of &subscripts. |
Although &subscript &KEY has already been set to several values, the most common value is 1. The current values of &FILE and &KEY determine &FILE-KEY-NAME, whereas &FILE-KEY-NAME always references key 1, regardless of the &KEY value.
% DECLARE &(&FILE)-KEY-(&KEY)-A
% &FILE-KEY-NAME X30
% &FILE-KEY-TYPE X
% &FILE-KEY-LEN N4
% DECLARE &(&FILE)-KEY-1-A
% &FILE-KEY-1-NAME X30
% &FILE-KEY-1-TYPE X
% &FILE-KEY-1-LEN N4
.
.
.
Access fixed-length strings of screen field attribute records that are stored in the SCRSYMB file.
% DECLARE &(&SCX-SCR)-XFLD-(&SCX-FLD)
% &SCP-FLD-NAME X16
% &SCP-REP-CNT N3
% &SCP-REP-COL N3
% &SCP-FLD-SHORT X8
% &SCP-FLD-FI
% &SCP-FLD-LEN N3
% &SCP-FLD-ROW N3
% &SCP-FLD-COL N3
% &SCP-FLD-ATTRS
% &SCP-FLD-PROT X
% &SCP-FLD-INTENS-FLG X
% &SCP-FLD-MDT-FLG X
% &SCP-FLD-NUM-FLG X
% &SCP-FLD-EXT-ATTRS
% &SCP-FLD-RVID-FLG X
% &SCP-FLD-BLINK-FLG X
% &SCP-FLD-UNDER-FLG X
% &SCP-FLD-COLOR X2
% &SCP-FLD-DET-FLG X
% &SCP-FLD-EDIT-FLG N
% &SCP-FLD-IM-MOD X
The above % DECLARE statement accommodates these fixed-length record strings stored in SCRSYMB.
% &DMOL-XFLD-1 = "PART-NBR 0 08 8 6 19UNTFFFF F1F"
% &DMOL-XFLD-2 = "SHORT-DESC 0 0 13 8 19PNTFFFF F0F"
% &DMOL-XFLD-3 = "LOCATION 5 3 12 12 5PNTFFFF F0F"
.
.
.
Directly reference a DECLARE table.
% DECLARE &VS-(&VSX-FILE)-KEY-(&VSX-KEY)-B
% &VSP-FILE-KEY-VOL X8
% &VSP-FILE-KEY-SPACE X20
% &VSP-FILE-KEY-CICZ X20
.
.
.
% &VSX-FILE = "FILE3"
% &VSX-KEY = 2
.
.
.
% &VOL = &VSP-FILE-KEY-VOL
Reference a DECLARE table with % LOOKUP.
% 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
.
.
.
% ELSE
.
.
.
Reference a loaded table by coding a table of value assignments; use % DECLARE to name the table and define &subs for the table name.
% DECLARE &OPERATOR-(&OPR)
% &OPERATOR X2
% &OPERATOR-SYMBOL X
% &OPERATOR-1 = "EQ="
% &OPERATOR-2 = "LT<"
% &OPERATOR-3 = "GT>"
% &OPERATOR-4 = "MI-"
% &OPERATOR-5 = "PL+"
% &OPERATOR-6 = "TIX"
% &OPERATOR-7 = "DI/"
Load a table of value assignments by varying the &subs of a % DECLARE.
% DECLARE &VS-OPT-(&VSX-OPT)
% &VS-FILE-OPT
% REPEAT VARYING &VSX-OPT FROM 1
% WHILE &DEFINED(&SCR-OPTS-<&VSX-OPT>)
% &VS-FILE-OPT = &DEFVAL
Comments: